diff options
Diffstat (limited to 'TAO/examples/POA/TIE/server.cpp')
-rw-r--r-- | TAO/examples/POA/TIE/server.cpp | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/TAO/examples/POA/TIE/server.cpp b/TAO/examples/POA/TIE/server.cpp index c4d8558e5fb..8264cb6f8bf 100644 --- a/TAO/examples/POA/TIE/server.cpp +++ b/TAO/examples/POA/TIE/server.cpp @@ -156,7 +156,7 @@ main (int argc, char **argv) CORBA::String_var first_ior = orb->object_to_string (a.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - + // Stringyfy all the object references and print them out. CORBA::String_var second_ior = orb->object_to_string (b.in (), ACE_TRY_ENV); @@ -178,23 +178,23 @@ main (int argc, char **argv) FILE *output_file_4 = ACE_OS::fopen ("ior_4", "w"); if (output_file_1) - ACE_OS::fprintf (output_file_1, + ACE_OS::fprintf (output_file_1, "%s", first_ior.in ()); if (output_file_2) - ACE_OS::fprintf (output_file_2, + ACE_OS::fprintf (output_file_2, "%s", second_ior.in ()); if (output_file_3) - ACE_OS::fprintf (output_file_3, + ACE_OS::fprintf (output_file_3, "%s", third_ior.in ()); if (output_file_4) - ACE_OS::fprintf (output_file_4, + ACE_OS::fprintf (output_file_4, "%s", forth_ior.in ()); - - ACE_OS::fclose (output_file_1); + + ACE_OS::fclose (output_file_1); ACE_OS::fclose (output_file_2); ACE_OS::fclose (output_file_3); ACE_OS::fclose (output_file_4); @@ -214,17 +214,17 @@ main (int argc, char **argv) FILE *output_file_5 = ACE_OS::fopen ("ior_5", "w"); FILE *output_file_6 = ACE_OS::fopen ("ior_6", "w"); - + if (output_file_5) - ACE_OS::fprintf (output_file_5, + ACE_OS::fprintf (output_file_5, "%s", fifth_ior.in ()); if (output_file_6) - ACE_OS::fprintf (output_file_6, + ACE_OS::fprintf (output_file_6, "%s", sixth_ior.in ()); - ACE_OS::fclose (output_file_5); + ACE_OS::fclose (output_file_5); ACE_OS::fclose (output_file_6); #endif /* ACE_HAS_USING_KEYWORD */ @@ -250,6 +250,13 @@ main (int argc, char **argv) if (orb->run () == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "CORBA::ORB::run"), -1); + + ACE_OS::strcpy (str, "PortableServer::POA::destroy"); + // Destroy RootPOA. + root_poa->destroy (1, + 1, + ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCHANY { |