diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Security/SecurityLevel1/server.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/Security/SecurityLevel1/server.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/TAO/orbsvcs/tests/Security/SecurityLevel1/server.cpp b/TAO/orbsvcs/tests/Security/SecurityLevel1/server.cpp index fb2d9fc3c85..e4565c73fa2 100644 --- a/TAO/orbsvcs/tests/Security/SecurityLevel1/server.cpp +++ b/TAO/orbsvcs/tests/Security/SecurityLevel1/server.cpp @@ -20,13 +20,13 @@ parse_args (int argc, char *argv[]) switch (c) { case 'o': - ior_output_file = get_opts.optarg; - break; + ior_output_file = get_opts.optarg; + break; case '?': default: ACE_ERROR_RETURN ((LM_ERROR, "Usage: %s " - "-o <iorfile>" + "-o <iorfile>" "\n", argv [0]), -1); @@ -42,12 +42,12 @@ main (int argc, char *argv[]) { /// Our regular ORB Initialization. CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); + CORBA::ORB_init (argc, argv, "" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; /// Get a reference to the RootPOA. CORBA::Object_var object = - orb->resolve_initial_references ("RootPOA", ACE_TRY_ENV); + orb->resolve_initial_references ("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (object.in ())) @@ -57,25 +57,25 @@ main (int argc, char *argv[]) /// Narrow down the reference to the currect interface. PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (object.in (), ACE_TRY_ENV); + PortableServer::POA::_narrow (object.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_TRY_ENV); + root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; if (parse_args (argc, argv) != 0) return 1; // Resolve reference to SecurityCurrent Object. - object = orb->resolve_initial_references ("SecurityCurrent", - ACE_TRY_ENV); + object = orb->resolve_initial_references ("SecurityCurrent" + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // Narrow it down to get the correct reference. SecurityLevel1::Current_var ss_current = - SecurityLevel1::Current::_narrow (object.in (), - ACE_TRY_ENV); + SecurityLevel1::Current::_narrow (object.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (ss_current.in ())) @@ -87,38 +87,38 @@ main (int argc, char *argv[]) SLevel1_Server_i level1_server (orb.in (), ss_current.in ()); SLevel1_Server_var server = - level1_server._this (ACE_TRY_ENV); + level1_server._this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::String_var ior = - orb->object_to_string (server.in (), - ACE_TRY_ENV); + orb->object_to_string (server.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) - { - FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); - if (output_file == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for writing IOR: %s", - ior_output_file), - 1); - ACE_OS::fprintf (output_file, "%s", ior.in ()); - ACE_OS::fclose (output_file); - } - - poa_manager->activate (ACE_TRY_ENV); + { + FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); + if (output_file == 0) + ACE_ERROR_RETURN ((LM_ERROR, + "Cannot open output file for writing IOR: %s", + ior_output_file), + 1); + ACE_OS::fprintf (output_file, "%s", ior.in ()); + ACE_OS::fclose (output_file); + } + + poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; // Start the ORB - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - root_poa->destroy (1, 1, ACE_TRY_ENV); + root_poa->destroy (1, 1 TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } |