diff options
Diffstat (limited to 'TAO/tests/POA/Persistent_ID/server.cpp')
-rw-r--r-- | TAO/tests/POA/Persistent_ID/server.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/TAO/tests/POA/Persistent_ID/server.cpp b/TAO/tests/POA/Persistent_ID/server.cpp index 15f8272c1a9..a39d1917712 100644 --- a/TAO/tests/POA/Persistent_ID/server.cpp +++ b/TAO/tests/POA/Persistent_ID/server.cpp @@ -21,6 +21,7 @@ #include "testS.h" #include "ace/OS_NS_stdio.h" #include "tao/PortableServer/PortableServer.h" +#include "ace/Argv_Type_Converter.h" ACE_RCSID(Explicit_Activation, server, "$Id$") @@ -130,15 +131,6 @@ test_i::create_POA (ACE_ENV_SINGLE_ARG_DECL) ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (test::_nil ()); - // Destroy the policies - for (CORBA::ULong i = 0; - i < policies.length (); - ++i) - { - policies[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; - } - test_i *servant = new test_i (this->orb_.in (), this->child_poa_.in ()); @@ -181,7 +173,7 @@ const char *ior_file = "ior"; static int parse_args (int argc, char **argv) { - ACE_Get_Opt get_opts (argc, argv, "f:"); + ACE_Get_Arg_Opt<char> get_opts (argc, argv, "f:"); int c; while ((c = get_opts ()) != -1) @@ -208,7 +200,7 @@ static int write_ior_to_file (const char *ior) { FILE *output_file = - ACE_OS::fopen (ior_file, "w"); + ACE_OS::fopen (ior_file, ACE_TEXT("w")); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output files for writing IOR: %s\n", @@ -233,20 +225,22 @@ write_ior_to_file (const char *ior) } int -main (int argc, char **argv) +ACE_TMAIN (int argc, ACE_TCHAR **argv) { + ACE_Argv_Type_Converter convert (argc, argv); + ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { CORBA::ORB_var orb = - CORBA::ORB_init (argc, - argv, + CORBA::ORB_init (convert.get_argc(), + convert.get_ASCII_argv(), 0 ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - int result = parse_args (argc, argv); + int result = parse_args (convert.get_argc(), convert.get_ASCII_argv()); if (result != 0) return result; |