diff options
Diffstat (limited to 'TAO/examples/POA/DSI/server.cpp')
-rw-r--r-- | TAO/examples/POA/DSI/server.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/TAO/examples/POA/DSI/server.cpp b/TAO/examples/POA/DSI/server.cpp index 9fc3fc567d2..523fadfc071 100644 --- a/TAO/examples/POA/DSI/server.cpp +++ b/TAO/examples/POA/DSI/server.cpp @@ -20,7 +20,7 @@ ACE_RCSID(DSI, server, "$Id$") -static const char *ior_output_file = "ior"; +static char *ior_output_file = 0; static int parse_args (int argc, char **argv) @@ -51,6 +51,10 @@ parse_args (int argc, char **argv) static int write_iors_to_file (const char *first_ior) { + if (ior_output_file == 0) + // No filename was specified; simply return + return 0; + FILE *output_file = ACE_OS::fopen (ior_output_file, "w"); if (output_file == 0) @@ -202,6 +206,13 @@ main (int argc, char **argv) // Run the ORB if (orb->run () == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "CORBA::ORB::run"), -1); + + ACE_OS::strcpy (str,"PortableServer::POA::destroy"); + // Destroy the rootPOA and its children + root_poa->destroy (1, + 1, + ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCHANY { |