diff options
Diffstat (limited to 'TAO/tests/Smart_Proxies/server.cpp')
-rw-r--r-- | TAO/tests/Smart_Proxies/server.cpp | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/TAO/tests/Smart_Proxies/server.cpp b/TAO/tests/Smart_Proxies/server.cpp index bc3396c04d9..22768dc39b3 100644 --- a/TAO/tests/Smart_Proxies/server.cpp +++ b/TAO/tests/Smart_Proxies/server.cpp @@ -27,7 +27,7 @@ class Test_i : public POA_Test { public: Test_i (CORBA::ORB_ptr orb); - + CORBA::Short method (CORBA::Short boo, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException, @@ -38,7 +38,7 @@ public: private: CORBA::ORB_var orb_; - + }; Test_i::Test_i (CORBA::ORB_ptr orb) @@ -110,14 +110,14 @@ main (int argc, char *argv[]) "", ACE_TRY_ENV); ACE_TRY_CHECK; - - Test_i servant (orb.in ()); + + Test_i servant (orb.in ()); // Obtain RootPOA. CORBA::Object_var object = - orb->resolve_initial_references ("RootPOA", + orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); - - PortableServer::POA_var root_poa = + + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (object.in (), ACE_TRY_ENV); @@ -138,7 +138,7 @@ main (int argc, char *argv[]) // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) { - FILE *output_file = + FILE *output_file = ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) @@ -156,10 +156,13 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - orb->run (ACE_TRY_ENV); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); + if (orb->run () == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n", + "orb->run"), + -1); + ACE_DEBUG ((LM_DEBUG, + "event loop finished\n")); root_poa->destroy (1, 1, @@ -175,3 +178,6 @@ main (int argc, char *argv[]) ACE_ENDTRY; return 0; } + + + |