diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp b/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp index 9920f3ca97b..ceafea4d1a5 100644 --- a/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Ordering/Structured_Supplier.cpp @@ -134,14 +134,12 @@ Supplier_Client::parse_args (int argc, char *argv[]) static CosNotifyChannelAdmin::SupplierAdmin_ptr -create_supplieradmin (CosNotifyChannelAdmin::EventChannel_ptr ec - ACE_ENV_ARG_DECL) +create_supplieradmin (CosNotifyChannelAdmin::EventChannel_ptr ec) { CosNotifyChannelAdmin::AdminID adminid = 0; CosNotifyChannelAdmin::SupplierAdmin_var admin = ec->new_for_suppliers (CosNotifyChannelAdmin::AND_OP, - adminid - ACE_ENV_ARG_PARAMETER); + adminid); return CosNotifyChannelAdmin::SupplierAdmin::_duplicate (admin.in ()); @@ -149,7 +147,7 @@ create_supplieradmin (CosNotifyChannelAdmin::EventChannel_ptr ec static void -SendEvent (int id ACE_ENV_ARG_DECL_NOT_USED) +SendEvent (int id) { CosNotification::StructuredEvent event; @@ -167,50 +165,48 @@ SendEvent (int id ACE_ENV_ARG_DECL_NOT_USED) CORBA::string_dup (CosNotification::Timeout); event.header.variable_header[2].value <<= (TimeBase::TimeT) (num_events - id); - ACE_TRY_NEW_ENV + try { - supplier_1->send_event (event ACE_ENV_ARG_PARAMETER); + supplier_1->send_event (event); } - ACE_CATCH (CORBA::Exception, e) + catch (const CORBA::Exception& e) { - ACE_PRINT_EXCEPTION (e, "Error: "); + e._tao_print_exception ("Error: "); } - ACE_ENDTRY; } static void create_suppliers (CosNotifyChannelAdmin::SupplierAdmin_ptr admin, - PortableServer::POA_ptr poa - ACE_ENV_ARG_DECL) + PortableServer::POA_ptr poa) { // startup the supplier ACE_NEW_THROW_EX (supplier_1, TAO_Notify_Tests_StructuredPushSupplier (), CORBA::NO_MEMORY ()); - supplier_1->init (poa ACE_ENV_ARG_PARAMETER); + supplier_1->init (poa); - supplier_1->connect (admin ACE_ENV_ARG_PARAMETER); + supplier_1->connect (admin); } int main (int argc, char* argv[]) { ACE_Auto_Ptr< sig_i > sig_impl; - ACE_TRY_NEW_ENV + try { Supplier_Client client; - int status = client.init (argc, argv ACE_ENV_ARG_PARAMETER); + int status = client.init (argc, argv); ACE_UNUSED_ARG(status); ACE_ASSERT(status == 0); CosNotifyChannelAdmin::EventChannel_var ec = - client.create_event_channel ("MyEventChannel", 0 ACE_ENV_ARG_PARAMETER); + client.create_event_channel ("MyEventChannel", 0); CosNotification::QoSProperties qos (1); qos.length (1); qos[0].name = CORBA::string_dup (CosNotification::OrderPolicy); qos[0].value <<= order_policy; - ec->set_qos (qos ACE_ENV_ARG_PARAMETER); + ec->set_qos (qos); CORBA::ORB_ptr orb = client.orb (); @@ -218,7 +214,7 @@ int main (int argc, char* argv[]) sig_var sig = sig_impl->_this (); CORBA::String_var ior = - orb->object_to_string (sig.in () ACE_ENV_ARG_PARAMETER); + orb->object_to_string (sig.in ()); if (ior_output_file != 0) { @@ -234,9 +230,9 @@ int main (int argc, char* argv[]) } CosNotifyChannelAdmin::SupplierAdmin_var admin = - create_supplieradmin (ec.in () ACE_ENV_ARG_PARAMETER); + create_supplieradmin (ec.in ()); ACE_ASSERT(!CORBA::is_nil (admin.in ())); - create_suppliers (admin.in (), client.root_poa () ACE_ENV_ARG_PARAMETER); + create_suppliers (admin.in (), client.root_poa ()); sig_impl->wait_for_startup(); @@ -244,7 +240,7 @@ int main (int argc, char* argv[]) for (int i = 0; i < num_events; ++i) { ACE_DEBUG((LM_DEBUG, "+")); - SendEvent (i ACE_ENV_ARG_PARAMETER); + SendEvent (i); } ACE_DEBUG((LM_DEBUG, "\nSupplier sent %d events.\n", num_events)); @@ -258,11 +254,10 @@ int main (int argc, char* argv[]) return 0; } - ACE_CATCH (CORBA::Exception, e) + catch (const CORBA::Exception& e) { - ACE_PRINT_EXCEPTION (e, "Error: "); + e._tao_print_exception ("Error: "); } - ACE_ENDTRY; return 1; } |