diff options
author | elliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-25 18:17:52 +0000 |
---|---|---|
committer | elliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-25 18:17:52 +0000 |
commit | 2ee7b7eed4c0cc10f4ec25b186b04202af01b565 (patch) | |
tree | 08a8a649c90559cf5b2228c1caad15515902613e /TAO/tests/Bug_1270_Regression | |
parent | c979767a00db4ea1299af482033a68829cc16675 (diff) | |
download | ATCD-2ee7b7eed4c0cc10f4ec25b186b04202af01b565.tar.gz |
ChangeLogTag: Thu Jan 25 17:39:59 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/tests/Bug_1270_Regression')
-rw-r--r-- | TAO/tests/Bug_1270_Regression/Echo.cpp | 3 | ||||
-rw-r--r-- | TAO/tests/Bug_1270_Regression/Echo.h | 3 | ||||
-rw-r--r-- | TAO/tests/Bug_1270_Regression/Echo_Caller.cpp | 5 | ||||
-rw-r--r-- | TAO/tests/Bug_1270_Regression/Echo_Caller.h | 3 | ||||
-rw-r--r-- | TAO/tests/Bug_1270_Regression/ORB_Task.cpp | 6 | ||||
-rw-r--r-- | TAO/tests/Bug_1270_Regression/Server_Timer.cpp | 9 | ||||
-rw-r--r-- | TAO/tests/Bug_1270_Regression/client.cpp | 39 | ||||
-rw-r--r-- | TAO/tests/Bug_1270_Regression/server.cpp | 25 | ||||
-rw-r--r-- | TAO/tests/Bug_1270_Regression/shutdown.cpp | 17 |
9 files changed, 39 insertions, 71 deletions
diff --git a/TAO/tests/Bug_1270_Regression/Echo.cpp b/TAO/tests/Bug_1270_Regression/Echo.cpp index df37f3c644b..b41ec6256ab 100644 --- a/TAO/tests/Bug_1270_Regression/Echo.cpp +++ b/TAO/tests/Bug_1270_Regression/Echo.cpp @@ -19,8 +19,7 @@ Echo::Echo(CORBA::ORB_ptr orb, } void -Echo::echo_payload(Test::Payload const & - ACE_ENV_ARG_DECL_NOT_USED) +Echo::echo_payload(Test::Payload const &) ACE_THROW_SPEC((CORBA::SystemException)) { this->abort_counter_--; diff --git a/TAO/tests/Bug_1270_Regression/Echo.h b/TAO/tests/Bug_1270_Regression/Echo.h index ba9fc0be452..5e835b6396a 100644 --- a/TAO/tests/Bug_1270_Regression/Echo.h +++ b/TAO/tests/Bug_1270_Regression/Echo.h @@ -18,8 +18,7 @@ public: Echo(CORBA::ORB_ptr orb, int abort_counter); - virtual void echo_payload (Test::Payload const & data - ACE_ENV_ARG_DECL_WITH_DEFAULTS) + virtual void echo_payload (Test::Payload const & data) ACE_THROW_SPEC((CORBA::SystemException)); private: diff --git a/TAO/tests/Bug_1270_Regression/Echo_Caller.cpp b/TAO/tests/Bug_1270_Regression/Echo_Caller.cpp index cb89caf8cc8..bf42f0b83d5 100644 --- a/TAO/tests/Bug_1270_Regression/Echo_Caller.cpp +++ b/TAO/tests/Bug_1270_Regression/Echo_Caller.cpp @@ -18,8 +18,7 @@ Echo_Caller::Echo_Caller(CORBA::ORB_ptr orb) } void -Echo_Caller::start_task(Test::Echo_ptr client - ACE_ENV_ARG_DECL_NOT_USED) +Echo_Caller::start_task(Test::Echo_ptr client) ACE_THROW_SPEC((CORBA::SystemException)) { Server_Timer * task = @@ -36,5 +35,5 @@ Echo_Caller::shutdown(void) ACE_THROW_SPEC((CORBA::SystemException)) { ACE_DEBUG ((LM_DEBUG, "Server received shutdown message\n")); - orb_->shutdown(0 ACE_ENV_ARG_PARAMETER); + orb_->shutdown(0); } diff --git a/TAO/tests/Bug_1270_Regression/Echo_Caller.h b/TAO/tests/Bug_1270_Regression/Echo_Caller.h index 1e59359fb83..e2a476e4052 100644 --- a/TAO/tests/Bug_1270_Regression/Echo_Caller.h +++ b/TAO/tests/Bug_1270_Regression/Echo_Caller.h @@ -16,8 +16,7 @@ class Echo_Caller : public POA_Test::Echo_Caller public: Echo_Caller(CORBA::ORB_ptr orb); - virtual void start_task(Test::Echo_ptr client - ACE_ENV_ARG_DECL_WITH_DEFAULTS) + virtual void start_task(Test::Echo_ptr client) ACE_THROW_SPEC((CORBA::SystemException)); virtual void shutdown(void) diff --git a/TAO/tests/Bug_1270_Regression/ORB_Task.cpp b/TAO/tests/Bug_1270_Regression/ORB_Task.cpp index 212bd3ea422..910d86061af 100644 --- a/TAO/tests/Bug_1270_Regression/ORB_Task.cpp +++ b/TAO/tests/Bug_1270_Regression/ORB_Task.cpp @@ -19,14 +19,12 @@ ORB_Task::ORB_Task (CORBA::ORB_ptr orb) int ORB_Task::svc (void) { - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { this->orb_->run (); } - ACE_CATCH (CORBA::Exception, ex) + catch (const CORBA::Exception& ) { } - ACE_ENDTRY; return 0; } diff --git a/TAO/tests/Bug_1270_Regression/Server_Timer.cpp b/TAO/tests/Bug_1270_Regression/Server_Timer.cpp index 3b6d54efa63..0e1697a1c98 100644 --- a/TAO/tests/Bug_1270_Regression/Server_Timer.cpp +++ b/TAO/tests/Bug_1270_Regression/Server_Timer.cpp @@ -37,8 +37,7 @@ Server_Timer::handle_timeout (ACE_Time_Value const &, void const *) ACE_OS::memset (pload.get_buffer(), pload.length(), 0); - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY + try { Test::Echo_var echo = Test::Echo::_duplicate (this->echo_.in ()); @@ -46,17 +45,15 @@ Server_Timer::handle_timeout (ACE_Time_Value const &, void const *) if(CORBA::is_nil (echo.in ())) return 0; - echo->echo_payload (pload - ACE_ENV_ARG_PARAMETER); + echo->echo_payload (pload); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { this->echo_ = Test::Echo::_nil (); if (this->reactor ()->cancel_timer (this) != 0) refcnt_--; } - ACE_ENDTRY; refcnt_--; if(refcnt_ == 0) diff --git a/TAO/tests/Bug_1270_Regression/client.cpp b/TAO/tests/Bug_1270_Regression/client.cpp index 4370c64aa77..9518e5f17e4 100644 --- a/TAO/tests/Bug_1270_Regression/client.cpp +++ b/TAO/tests/Bug_1270_Regression/client.cpp @@ -19,19 +19,16 @@ parse_args (int argc, char *argv[]); int main (int argc, char *argv[]) { - ACE_TRY_NEW_ENV + try { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" - ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (argc, argv, ""); CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA" - ACE_ENV_ARG_PARAMETER); + orb->resolve_initial_references("RootPOA"); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () - ACE_ENV_ARG_PARAMETER); + PortableServer::POA::_narrow (poa_object.in ()); if (CORBA::is_nil (root_poa.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -42,10 +39,10 @@ main (int argc, char *argv[]) root_poa->the_POAManager (); CORBA::Object_var object = - orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER); + orb->resolve_initial_references ("PolicyCurrent"); CORBA::PolicyCurrent_var policy_current = - CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER); + CORBA::PolicyCurrent::_narrow (object.in ()); if (CORBA::is_nil (policy_current.in ())) { @@ -58,11 +55,9 @@ main (int argc, char *argv[]) CORBA::PolicyList policies(1); policies.length (1); policies[0] = orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE, - scope_as_any - ACE_ENV_ARG_PARAMETER); + scope_as_any); - policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE - ACE_ENV_ARG_PARAMETER); + policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE); policies[0]->destroy (); @@ -86,12 +81,10 @@ main (int argc, char *argv[]) impl->_this (); CORBA::Object_var tmp = - orb->string_to_object(ior - ACE_ENV_ARG_PARAMETER); + orb->string_to_object(ior); Test::Echo_Caller_var server = - Test::Echo_Caller::_narrow(tmp.in () - ACE_ENV_ARG_PARAMETER); + Test::Echo_Caller::_narrow(tmp.in ()); if (CORBA::is_nil (echo.in ())) { @@ -103,26 +96,22 @@ main (int argc, char *argv[]) poa_manager->activate (); - server->start_task(echo.in() - ACE_ENV_ARG_PARAMETER); + server->start_task(echo.in()); orb->run (); ACE_DEBUG ((LM_DEBUG, "(%P|%t) client - event loop finished\n")); // Actually the code here should never be reached. - root_poa->destroy (1, 1 - ACE_ENV_ARG_PARAMETER); + root_poa->destroy (1, 1); orb->destroy (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); + ex._tao_print_exception ("Exception caught:"); return 1; } - ACE_ENDTRY; return 0; } diff --git a/TAO/tests/Bug_1270_Regression/server.cpp b/TAO/tests/Bug_1270_Regression/server.cpp index 33549291602..dfd8ef60c30 100644 --- a/TAO/tests/Bug_1270_Regression/server.cpp +++ b/TAO/tests/Bug_1270_Regression/server.cpp @@ -16,19 +16,16 @@ parse_args (int argc, char *argv[]); int main (int argc, char *argv[]) { - ACE_TRY_NEW_ENV + try { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" - ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (argc, argv, ""); CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA" - ACE_ENV_ARG_PARAMETER); + orb->resolve_initial_references("RootPOA"); PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in () - ACE_ENV_ARG_PARAMETER); + PortableServer::POA::_narrow (poa_object.in ()); if (CORBA::is_nil (root_poa.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -39,7 +36,7 @@ main (int argc, char *argv[]) root_poa->the_POAManager (); CORBA::Object_var object = - orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER); + orb->resolve_initial_references ("PolicyCurrent"); if (parse_args (argc, argv) != 0) return 1; @@ -61,8 +58,7 @@ main (int argc, char *argv[]) impl->_this (); CORBA::String_var ior = - orb->object_to_string (server.in () - ACE_ENV_ARG_PARAMETER); + orb->object_to_string (server.in ()); // If the ior_output_file exists, output the ior to it FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); @@ -80,18 +76,15 @@ main (int argc, char *argv[]) ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n")); - root_poa->destroy (1, 1 - ACE_ENV_ARG_PARAMETER); + root_poa->destroy (1, 1); orb->destroy (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); + ex._tao_print_exception ("Exception caught:"); return 1; } - ACE_ENDTRY; return 0; } diff --git a/TAO/tests/Bug_1270_Regression/shutdown.cpp b/TAO/tests/Bug_1270_Regression/shutdown.cpp index d4635a921d2..8b8eb38a93e 100644 --- a/TAO/tests/Bug_1270_Regression/shutdown.cpp +++ b/TAO/tests/Bug_1270_Regression/shutdown.cpp @@ -13,22 +13,19 @@ parse_args (int argc, char *argv[]); int main (int argc, char *argv[]) { - ACE_TRY_NEW_ENV + try { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" - ACE_ENV_ARG_PARAMETER); + CORBA::ORB_init (argc, argv, ""); if (parse_args (argc, argv) != 0) return 1; CORBA::Object_var tmp = - orb->string_to_object (ior - ACE_ENV_ARG_PARAMETER); + orb->string_to_object (ior); Test::Echo_Caller_var server = - Test::Echo_Caller::_narrow(tmp.in () - ACE_ENV_ARG_PARAMETER); + Test::Echo_Caller::_narrow(tmp.in ()); if (CORBA::is_nil (server.in ())) { @@ -42,13 +39,11 @@ main (int argc, char *argv[]) orb->destroy (); } - ACE_CATCHANY + catch (const CORBA::Exception& ex) { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); + ex._tao_print_exception ("Exception caught:"); return 1; } - ACE_ENDTRY; return 0; } |