diff options
Diffstat (limited to 'TAO/tests/Oneway_Buffering')
-rw-r--r-- | TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp | 16 | ||||
-rw-r--r-- | TAO/tests/Oneway_Buffering/Oneway_Buffering.h | 10 | ||||
-rw-r--r-- | TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp | 14 | ||||
-rw-r--r-- | TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h | 12 | ||||
-rw-r--r-- | TAO/tests/Oneway_Buffering/admin.cpp | 26 | ||||
-rw-r--r-- | TAO/tests/Oneway_Buffering/client.cpp | 190 | ||||
-rw-r--r-- | TAO/tests/Oneway_Buffering/server.cpp | 36 |
7 files changed, 152 insertions, 152 deletions
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp b/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp index 3e539d45dd1..f12cbec55dd 100644 --- a/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp +++ b/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp @@ -13,29 +13,29 @@ Oneway_Buffering::Oneway_Buffering (CORBA::ORB_ptr orb, } void -Oneway_Buffering::receive_data (const Test::Payload &the_payload, - CORBA::Environment &ACE_TRY_ENV) +Oneway_Buffering::receive_data (const Test::Payload &the_payload + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->admin_->request_received (the_payload.length (), ACE_TRY_ENV); + this->admin_->request_received (the_payload.length () TAO_ENV_ARG_PARAMETER); } void -Oneway_Buffering::flush (CORBA::Environment &) +Oneway_Buffering::flush (TAO_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { } void -Oneway_Buffering::sync (CORBA::Environment &ACE_TRY_ENV) +Oneway_Buffering::sync (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->admin_->flush (ACE_TRY_ENV); + this->admin_->flush (TAO_ENV_SINGLE_ARG_PARAMETER); } void -Oneway_Buffering::shutdown (CORBA::Environment &ACE_TRY_ENV) +Oneway_Buffering::shutdown (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->orb_->shutdown (0, ACE_TRY_ENV); + this->orb_->shutdown (0 TAO_ENV_ARG_PARAMETER); } diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering.h b/TAO/tests/Oneway_Buffering/Oneway_Buffering.h index 302ea846f43..4ea1dd52b64 100644 --- a/TAO/tests/Oneway_Buffering/Oneway_Buffering.h +++ b/TAO/tests/Oneway_Buffering/Oneway_Buffering.h @@ -26,17 +26,17 @@ public: Test::Oneway_Buffering_Admin_ptr admin); // = The skeleton methods - virtual void receive_data (const Test::Payload &the_payload, - CORBA::Environment &ACE_TRY_ENV) + virtual void receive_data (const Test::Payload &the_payload + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void flush (CORBA::Environment &ACE_TRY_ENV) + virtual void flush (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void sync (CORBA::Environment &ACE_TRY_ENV) + virtual void sync (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void shutdown (CORBA::Environment &ACE_TRY_ENV) + virtual void shutdown (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); private: diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp index 3512584b812..bf3413506f7 100644 --- a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp +++ b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp @@ -13,22 +13,22 @@ Oneway_Buffering_Admin::Oneway_Buffering_Admin (CORBA::ORB_ptr orb) } CORBA::ULong -Oneway_Buffering_Admin::request_count (CORBA::Environment &) +Oneway_Buffering_Admin::request_count (TAO_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->request_count_; } CORBA::ULong -Oneway_Buffering_Admin::bytes_received_count (CORBA::Environment &) +Oneway_Buffering_Admin::bytes_received_count (TAO_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { return this->bytes_received_count_; } void -Oneway_Buffering_Admin::request_received (CORBA::ULong payload_length, - CORBA::Environment &) +Oneway_Buffering_Admin::request_received (CORBA::ULong payload_length + TAO_ENV_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { this->request_count_++; @@ -36,14 +36,14 @@ Oneway_Buffering_Admin::request_received (CORBA::ULong payload_length, } void -Oneway_Buffering_Admin::flush (CORBA::Environment &) +Oneway_Buffering_Admin::flush (TAO_ENV_SINGLE_ARG_DECL_NOT_USED) ACE_THROW_SPEC ((CORBA::SystemException)) { } void -Oneway_Buffering_Admin::shutdown (CORBA::Environment &ACE_TRY_ENV) +Oneway_Buffering_Admin::shutdown (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->orb_->shutdown (0, ACE_TRY_ENV); + this->orb_->shutdown (0 TAO_ENV_ARG_PARAMETER); } diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h index 56b2088e965..bce8067204a 100644 --- a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h +++ b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h @@ -25,20 +25,20 @@ public: Oneway_Buffering_Admin (CORBA::ORB_ptr orb); // = The skeleton methods - virtual CORBA::ULong request_count (CORBA::Environment &ACE_TRY_ENV) + virtual CORBA::ULong request_count (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual CORBA::ULong bytes_received_count (CORBA::Environment &ACE_TRY_ENV) + virtual CORBA::ULong bytes_received_count (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void request_received (CORBA::ULong payload_length, - CORBA::Environment &ACE_TRY_ENV) + virtual void request_received (CORBA::ULong payload_length + TAO_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void flush (CORBA::Environment &ACE_TRY_ENV) + virtual void flush (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void shutdown (CORBA::Environment &ACE_TRY_ENV) + virtual void shutdown (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); private: diff --git a/TAO/tests/Oneway_Buffering/admin.cpp b/TAO/tests/Oneway_Buffering/admin.cpp index 0b4ac68af67..f2e44e5ede2 100644 --- a/TAO/tests/Oneway_Buffering/admin.cpp +++ b/TAO/tests/Oneway_Buffering/admin.cpp @@ -17,14 +17,14 @@ 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); @@ -39,15 +39,15 @@ main (int argc, char *argv[]) ACE_TRY_NEW_ENV { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); + CORBA::ORB_init (argc, argv, "" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA", ACE_TRY_ENV); + orb->resolve_initial_references("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV); + PortableServer::POA::_narrow (poa_object.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (root_poa.in ())) @@ -56,7 +56,7 @@ main (int argc, char *argv[]) 1); 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) @@ -69,11 +69,11 @@ main (int argc, char *argv[]) PortableServer::ServantBase_var owner_transfer(oneway_buffering_admin_impl); Test::Oneway_Buffering_Admin_var oneway_buffering_admin = - oneway_buffering_admin_impl->_this (ACE_TRY_ENV); + oneway_buffering_admin_impl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::String_var ior = - orb->object_to_string (oneway_buffering_admin.in (), ACE_TRY_ENV); + orb->object_to_string (oneway_buffering_admin.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // If the ior_output_file exists, output the ior to it @@ -86,18 +86,18 @@ main (int argc, char *argv[]) ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); - poa_manager->activate (ACE_TRY_ENV); + poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "(%P|%t) admin - event loop finished\n")); - 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; } ACE_CATCHANY diff --git a/TAO/tests/Oneway_Buffering/client.cpp b/TAO/tests/Oneway_Buffering/client.cpp index 5cd6dafec55..388ddeafcf7 100644 --- a/TAO/tests/Oneway_Buffering/client.cpp +++ b/TAO/tests/Oneway_Buffering/client.cpp @@ -87,26 +87,26 @@ parse_args (int argc, char *argv[]) int run_message_count (CORBA::ORB_ptr orb, Test::Oneway_Buffering_ptr oneway_buffering, - Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin, - CORBA::Environment &ACE_TRY_ENV); + Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin + TAO_ENV_ARG_DECL); int run_timeout (CORBA::ORB_ptr orb, Test::Oneway_Buffering_ptr oneway_buffering, - Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin, - CORBA::Environment &ACE_TRY_ENV); + Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin + TAO_ENV_ARG_DECL); int run_timeout_reactive (CORBA::ORB_ptr orb, Test::Oneway_Buffering_ptr oneway_buffering, - Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin, - CORBA::Environment &ACE_TRY_ENV); + Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin + TAO_ENV_ARG_DECL); int run_buffer_size (CORBA::ORB_ptr orb, Test::Oneway_Buffering_ptr oneway_buffering, - Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin, - CORBA::Environment &ACE_TRY_ENV); + Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin + TAO_ENV_ARG_DECL); int main (int argc, char *argv[]) @@ -115,18 +115,18 @@ main (int argc, char *argv[]) ACE_TRY_NEW_ENV { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); + CORBA::ORB_init (argc, argv, "" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (parse_args (argc, argv) != 0) return 1; CORBA::Object_var tmp = - orb->string_to_object(server_ior, ACE_TRY_ENV); + orb->string_to_object(server_ior TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; Test::Oneway_Buffering_var oneway_buffering = - Test::Oneway_Buffering::_narrow(tmp.in (), ACE_TRY_ENV); + Test::Oneway_Buffering::_narrow(tmp.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (oneway_buffering.in ())) @@ -138,11 +138,11 @@ main (int argc, char *argv[]) } tmp = - orb->string_to_object(admin_ior, ACE_TRY_ENV); + orb->string_to_object(admin_ior TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; Test::Oneway_Buffering_Admin_var oneway_buffering_admin = - Test::Oneway_Buffering_Admin::_narrow(tmp.in (), ACE_TRY_ENV); + Test::Oneway_Buffering_Admin::_narrow(tmp.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (oneway_buffering_admin.in ())) @@ -160,8 +160,8 @@ main (int argc, char *argv[]) test_failed = run_message_count (orb.in (), oneway_buffering.in (), - oneway_buffering_admin.in (), - ACE_TRY_ENV); + oneway_buffering_admin.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } else if (run_timeout_test) @@ -171,8 +171,8 @@ main (int argc, char *argv[]) test_failed = run_timeout (orb.in (), oneway_buffering.in (), - oneway_buffering_admin.in (), - ACE_TRY_ENV); + oneway_buffering_admin.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } else if (run_timeout_reactive_test) @@ -182,8 +182,8 @@ main (int argc, char *argv[]) test_failed = run_timeout_reactive (orb.in (), oneway_buffering.in (), - oneway_buffering_admin.in (), - ACE_TRY_ENV); + oneway_buffering_admin.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } else if (run_buffer_size_test) @@ -193,8 +193,8 @@ main (int argc, char *argv[]) test_failed = run_buffer_size (orb.in (), oneway_buffering.in (), - oneway_buffering_admin.in (), - ACE_TRY_ENV); + oneway_buffering_admin.in () + TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; } else @@ -203,13 +203,13 @@ main (int argc, char *argv[]) "ERROR: No test was configured\n")); } - oneway_buffering->shutdown (ACE_TRY_ENV); + oneway_buffering->shutdown (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - oneway_buffering_admin->shutdown (ACE_TRY_ENV); + oneway_buffering_admin->shutdown (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - orb->destroy (ACE_TRY_ENV); + orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; } ACE_CATCHANY @@ -227,15 +227,15 @@ int configure_policies (CORBA::ORB_ptr orb, const TAO::BufferingConstraint &buffering_constraint, Test::Oneway_Buffering_ptr oneway_buffering, - Test::Oneway_Buffering_out flusher, - CORBA::Environment &ACE_TRY_ENV) + Test::Oneway_Buffering_out flusher + TAO_ENV_ARG_DECL) { CORBA::Object_var object = - orb->resolve_initial_references ("PolicyCurrent", ACE_TRY_ENV); + orb->resolve_initial_references ("PolicyCurrent" TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); CORBA::PolicyCurrent_var policy_current = - CORBA::PolicyCurrent::_narrow (object.in (), ACE_TRY_ENV); + CORBA::PolicyCurrent::_narrow (object.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (CORBA::is_nil (policy_current.in ())) @@ -252,22 +252,22 @@ configure_policies (CORBA::ORB_ptr orb, CORBA::PolicyList policies (2); policies.length (2); policies[0] = orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE, - scope_as_any, - ACE_TRY_ENV); + scope_as_any + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); policies[1] = orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE, - buffering_as_any, - ACE_TRY_ENV); + buffering_as_any + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE, - ACE_TRY_ENV); + policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - policies[0]->destroy (ACE_TRY_ENV); + policies[0]->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - policies[1]->destroy (ACE_TRY_ENV); + policies[1]->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); TAO::BufferingConstraint flush_constraint; @@ -280,51 +280,51 @@ configure_policies (CORBA::ORB_ptr orb, policies.length (1); policies[0] = orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE, - buffering_as_any, - ACE_TRY_ENV); + buffering_as_any + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); object = oneway_buffering->_set_policy_overrides (policies, - CORBA::ADD_OVERRIDE, - ACE_TRY_ENV); + CORBA::ADD_OVERRIDE + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - policies[0]->destroy (ACE_TRY_ENV); + policies[0]->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); flusher = - Test::Oneway_Buffering::_narrow (object.in (), ACE_TRY_ENV); + Test::Oneway_Buffering::_narrow (object.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); return 0; } void -sync_server (Test::Oneway_Buffering_ptr flusher, - CORBA::Environment &ACE_TRY_ENV) +sync_server (Test::Oneway_Buffering_ptr flusher + TAO_ENV_ARG_DECL) { // Get back in sync with the server... - flusher->flush (ACE_TRY_ENV); + flusher->flush (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - flusher->sync (ACE_TRY_ENV); + flusher->sync (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; } int run_liveness_test (Test::Oneway_Buffering_ptr oneway_buffering, Test::Oneway_Buffering_ptr flusher, - Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin, - CORBA::Environment &ACE_TRY_ENV) + Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin + TAO_ENV_ARG_DECL) { ACE_DEBUG ((LM_DEBUG, ".... checking for liveness\n")); int test_failed = 0; - sync_server (flusher, ACE_TRY_ENV); + sync_server (flusher TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); CORBA::ULong send_count = - oneway_buffering_admin->request_count (ACE_TRY_ENV); + oneway_buffering_admin->request_count (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); int liveness_test_iterations = int(send_count); @@ -337,12 +337,12 @@ run_liveness_test (Test::Oneway_Buffering_ptr oneway_buffering, int depth = 0; for (int i = 0; i != liveness_test_iterations; ++i) { - oneway_buffering->receive_data (payload, ACE_TRY_ENV); + oneway_buffering->receive_data (payload TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); send_count++; CORBA::ULong receive_count = - oneway_buffering_admin->request_count (ACE_TRY_ENV); + oneway_buffering_admin->request_count (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); // Once the system has sent enough messages we don't @@ -360,13 +360,13 @@ run_liveness_test (Test::Oneway_Buffering_ptr oneway_buffering, "expected %u\n", i, receive_count, expected)); - sync_server (flusher, ACE_TRY_ENV); + sync_server (flusher TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); } if (depth++ == LIVENESS_MAX_DEPTH) { - sync_server (flusher, ACE_TRY_ENV); + sync_server (flusher TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); depth = 0; @@ -380,8 +380,8 @@ run_liveness_test (Test::Oneway_Buffering_ptr oneway_buffering, int run_message_count (CORBA::ORB_ptr orb, Test::Oneway_Buffering_ptr oneway_buffering, - Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin, - CORBA::Environment &ACE_TRY_ENV) + Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin + TAO_ENV_ARG_DECL) { TAO::BufferingConstraint buffering_constraint; buffering_constraint.mode = TAO::BUFFER_MESSAGE_COUNT; @@ -392,8 +392,8 @@ run_message_count (CORBA::ORB_ptr orb, Test::Oneway_Buffering_var flusher; int test_failed = configure_policies (orb, buffering_constraint, - oneway_buffering, flusher.out (), - ACE_TRY_ENV); + oneway_buffering, flusher.out () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (test_failed != 0) @@ -407,11 +407,11 @@ run_message_count (CORBA::ORB_ptr orb, CORBA::ULong send_count = 0; for (int i = 0; i != iterations; ++i) { - sync_server (flusher.in (), ACE_TRY_ENV); + sync_server (flusher.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); CORBA::ULong initial_receive_count = - oneway_buffering_admin->request_count (ACE_TRY_ENV); + oneway_buffering_admin->request_count (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (initial_receive_count != send_count) @@ -424,12 +424,12 @@ run_message_count (CORBA::ORB_ptr orb, while (1) { - oneway_buffering->receive_data (payload, ACE_TRY_ENV); + oneway_buffering->receive_data (payload TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); send_count++; CORBA::ULong receive_count = - oneway_buffering_admin->request_count (ACE_TRY_ENV); + oneway_buffering_admin->request_count (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); CORBA::ULong iteration_count = @@ -466,8 +466,8 @@ run_message_count (CORBA::ORB_ptr orb, int liveness_test_failed = run_liveness_test (oneway_buffering, flusher.in (), - oneway_buffering_admin, - ACE_TRY_ENV); + oneway_buffering_admin + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (liveness_test_failed) @@ -479,8 +479,8 @@ run_message_count (CORBA::ORB_ptr orb, int run_timeout (CORBA::ORB_ptr orb, Test::Oneway_Buffering_ptr oneway_buffering, - Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin, - CORBA::Environment &ACE_TRY_ENV) + Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin + TAO_ENV_ARG_DECL) { TAO::BufferingConstraint buffering_constraint; buffering_constraint.mode = TAO::BUFFER_TIMEOUT; @@ -491,8 +491,8 @@ run_timeout (CORBA::ORB_ptr orb, Test::Oneway_Buffering_var flusher; int test_failed = configure_policies (orb, buffering_constraint, - oneway_buffering, flusher.out (), - ACE_TRY_ENV); + oneway_buffering, flusher.out () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (test_failed != 0) @@ -506,11 +506,11 @@ run_timeout (CORBA::ORB_ptr orb, CORBA::ULong send_count = 0; for (int i = 0; i != iterations; ++i) { - sync_server (flusher.in (), ACE_TRY_ENV); + sync_server (flusher.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); CORBA::ULong initial_receive_count = - oneway_buffering_admin->request_count (ACE_TRY_ENV); + oneway_buffering_admin->request_count (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (initial_receive_count != send_count) @@ -524,12 +524,12 @@ run_timeout (CORBA::ORB_ptr orb, ACE_Time_Value start = ACE_OS::gettimeofday (); while (1) { - oneway_buffering->receive_data (payload, ACE_TRY_ENV); + oneway_buffering->receive_data (payload TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); send_count++; CORBA::ULong receive_count = - oneway_buffering_admin->request_count (ACE_TRY_ENV); + oneway_buffering_admin->request_count (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_Time_Value elapsed = ACE_OS::gettimeofday () - start; @@ -566,8 +566,8 @@ run_timeout (CORBA::ORB_ptr orb, int liveness_test_failed = run_liveness_test (oneway_buffering, flusher.in (), - oneway_buffering_admin, - ACE_TRY_ENV); + oneway_buffering_admin + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (liveness_test_failed) @@ -580,8 +580,8 @@ run_timeout (CORBA::ORB_ptr orb, int run_timeout_reactive (CORBA::ORB_ptr orb, Test::Oneway_Buffering_ptr oneway_buffering, - Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin, - CORBA::Environment &ACE_TRY_ENV) + Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin + TAO_ENV_ARG_DECL) { TAO::BufferingConstraint buffering_constraint; buffering_constraint.mode = TAO::BUFFER_TIMEOUT; @@ -592,8 +592,8 @@ run_timeout_reactive (CORBA::ORB_ptr orb, Test::Oneway_Buffering_var flusher; int test_failed = configure_policies (orb, buffering_constraint, - oneway_buffering, flusher.out (), - ACE_TRY_ENV); + oneway_buffering, flusher.out () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (test_failed != 0) @@ -607,11 +607,11 @@ run_timeout_reactive (CORBA::ORB_ptr orb, CORBA::ULong send_count = 0; for (int i = 0; i != iterations; ++i) { - sync_server (flusher.in (), ACE_TRY_ENV); + sync_server (flusher.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); CORBA::ULong initial_receive_count = - oneway_buffering_admin->request_count (ACE_TRY_ENV); + oneway_buffering_admin->request_count (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (initial_receive_count != send_count) @@ -625,18 +625,18 @@ run_timeout_reactive (CORBA::ORB_ptr orb, ACE_Time_Value start = ACE_OS::gettimeofday (); for (int j = 0; j != 20; ++j) { - oneway_buffering->receive_data (payload, ACE_TRY_ENV); + oneway_buffering->receive_data (payload TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); send_count++; } while (1) { CORBA::ULong receive_count = - oneway_buffering_admin->request_count (ACE_TRY_ENV); + oneway_buffering_admin->request_count (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_Time_Value sleep (0, 10000); - orb->run (sleep, ACE_TRY_ENV); + orb->run (sleep TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); ACE_Time_Value elapsed = ACE_OS::gettimeofday () - start; @@ -673,8 +673,8 @@ run_timeout_reactive (CORBA::ORB_ptr orb, int liveness_test_failed = run_liveness_test (oneway_buffering, flusher.in (), - oneway_buffering_admin, - ACE_TRY_ENV); + oneway_buffering_admin + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (liveness_test_failed) @@ -687,8 +687,8 @@ run_timeout_reactive (CORBA::ORB_ptr orb, int run_buffer_size (CORBA::ORB_ptr orb, Test::Oneway_Buffering_ptr oneway_buffering, - Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin, - CORBA::Environment &ACE_TRY_ENV) + Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin + TAO_ENV_ARG_DECL) { TAO::BufferingConstraint buffering_constraint; buffering_constraint.mode = TAO::BUFFER_MESSAGE_BYTES; @@ -699,8 +699,8 @@ run_buffer_size (CORBA::ORB_ptr orb, Test::Oneway_Buffering_var flusher; int test_failed = configure_policies (orb, buffering_constraint, - oneway_buffering, flusher.out (), - ACE_TRY_ENV); + oneway_buffering, flusher.out () + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (test_failed != 0) @@ -714,11 +714,11 @@ run_buffer_size (CORBA::ORB_ptr orb, CORBA::ULong bytes_sent = 0; for (int i = 0; i != iterations; ++i) { - sync_server (flusher.in (), ACE_TRY_ENV); + sync_server (flusher.in () TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); CORBA::ULong initial_bytes_received = - oneway_buffering_admin->bytes_received_count (ACE_TRY_ENV); + oneway_buffering_admin->bytes_received_count (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (initial_bytes_received != bytes_sent) @@ -731,12 +731,12 @@ run_buffer_size (CORBA::ORB_ptr orb, while (1) { - oneway_buffering->receive_data (payload, ACE_TRY_ENV); + oneway_buffering->receive_data (payload TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); bytes_sent += PAYLOAD_LENGTH; CORBA::ULong bytes_received = - oneway_buffering_admin->bytes_received_count (ACE_TRY_ENV); + oneway_buffering_admin->bytes_received_count (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); CORBA::ULong payload_delta = @@ -778,8 +778,8 @@ run_buffer_size (CORBA::ORB_ptr orb, int liveness_test_failed = run_liveness_test (oneway_buffering, flusher.in (), - oneway_buffering_admin, - ACE_TRY_ENV); + oneway_buffering_admin + TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); if (liveness_test_failed) diff --git a/TAO/tests/Oneway_Buffering/server.cpp b/TAO/tests/Oneway_Buffering/server.cpp index 707890bdf9c..bc92d73ca4c 100644 --- a/TAO/tests/Oneway_Buffering/server.cpp +++ b/TAO/tests/Oneway_Buffering/server.cpp @@ -18,19 +18,19 @@ 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 'k': - ior = get_opts.optarg; - break; + ior = get_opts.optarg; + break; case '?': default: ACE_ERROR_RETURN ((LM_ERROR, "usage: %s " - "-o <iorfile> " - "-k <ior> " + "-o <iorfile> " + "-k <ior> " "\n", argv [0]), -1); @@ -45,15 +45,15 @@ main (int argc, char *argv[]) ACE_TRY_NEW_ENV { CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); + CORBA::ORB_init (argc, argv, "" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA", ACE_TRY_ENV); + orb->resolve_initial_references("RootPOA" TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; PortableServer::POA_var root_poa = - PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV); + PortableServer::POA::_narrow (poa_object.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (root_poa.in ())) @@ -62,18 +62,18 @@ main (int argc, char *argv[]) 1); 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; CORBA::Object_var tmp = - orb->string_to_object(ior, ACE_TRY_ENV); + orb->string_to_object(ior TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; Test::Oneway_Buffering_Admin_var admin = - Test::Oneway_Buffering_Admin::_narrow(tmp.in (), ACE_TRY_ENV); + Test::Oneway_Buffering_Admin::_narrow(tmp.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (CORBA::is_nil (admin.in ())) @@ -92,11 +92,11 @@ main (int argc, char *argv[]) PortableServer::ServantBase_var owner_transfer(oneway_buffering_impl); Test::Oneway_Buffering_var oneway_buffering = - oneway_buffering_impl->_this (ACE_TRY_ENV); + oneway_buffering_impl->_this (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; CORBA::String_var ior = - orb->object_to_string (oneway_buffering.in (), ACE_TRY_ENV); + orb->object_to_string (oneway_buffering.in () TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; // If the ior_output_file exists, output the ior to it @@ -109,18 +109,18 @@ main (int argc, char *argv[]) ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); - poa_manager->activate (ACE_TRY_ENV); + poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; - orb->run (ACE_TRY_ENV); + orb->run (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n")); - 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; } ACE_CATCHANY |