summaryrefslogtreecommitdiff
path: root/TAO/tests/Smart_Proxies/On_Demand/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Smart_Proxies/On_Demand/server.cpp')
-rw-r--r--TAO/tests/Smart_Proxies/On_Demand/server.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/TAO/tests/Smart_Proxies/On_Demand/server.cpp b/TAO/tests/Smart_Proxies/On_Demand/server.cpp
index d72e3068539..79975e2e1d2 100644
--- a/TAO/tests/Smart_Proxies/On_Demand/server.cpp
+++ b/TAO/tests/Smart_Proxies/On_Demand/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;
}
+
+
+