diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-01-24 15:39:09 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-01-24 15:39:09 +0000 |
commit | c801f87e59c00f72bdeb5ce7bd0d276674665bac (patch) | |
tree | 70bff03d1cf156ecf05ee4c5c338d8ce423e64ee /TAO/orbsvcs/tests/Notify/Reconnecting | |
parent | 98c0b37d4714ff774fc3ada8c9ee893c719af714 (diff) | |
download | ATCD-c801f87e59c00f72bdeb5ce7bd0d276674665bac.tar.gz |
Wed Jan 24 14:00:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/Reconnecting')
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.cpp | 143 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.h | 24 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.cpp | 150 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.h | 30 |
4 files changed, 103 insertions, 244 deletions
diff --git a/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.cpp b/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.cpp index 43acfd70c38..36199f3cbd9 100644 --- a/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.cpp @@ -159,7 +159,6 @@ StructuredPushConsumer_i::push_structured_event ( static_cast<int>(this->received_) )); ACE_THROW (CORBA::UNKNOWN()); - ACE_CHECK; } if (notification.filterable_data.length () > 0) { @@ -393,7 +392,6 @@ SequencePushConsumer_i::push_structured_events ( static_cast<int>(nevent + 1) )); ACE_THROW (CORBA::UNKNOWN()); - ACE_CHECK; } const CosNotification::StructuredEvent & notification = notifications[nevent]; if (notification.filterable_data.length () > 0) @@ -605,7 +603,6 @@ AnyPushConsumer_i::push ( static_cast<int>(this->received_) )); ACE_THROW (CORBA::UNKNOWN()); - ACE_CHECK; } CORBA::ULong seq = 0; if (data >>= seq) @@ -701,11 +698,9 @@ ReconnectionCallback_i::reconnect ( ACE_TEXT ("(%P|%t) Consumer received reconnection request\n") )); this->ecf_ = CosNotifyChannelAdmin::EventChannelFactory::_narrow (reconnection ACE_ENV_ARG_PARAMETER); - ACE_CHECK; if (!CORBA::is_nil (this->ecf_.in ())) { this->consumer_main_.reconnect (this->ecf_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->reconnect_count_ += 1; } else @@ -717,7 +712,7 @@ ReconnectionCallback_i::reconnect ( } CORBA::Boolean -ReconnectionCallback_i::is_alive (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ReconnectionCallback_i::is_alive (void) ACE_THROW_SPEC ((CORBA::SystemException)) { return CORBA::Boolean (1); @@ -733,16 +728,14 @@ ReconnectionCallback_i::~ReconnectionCallback_i () void -ReconnectionCallback_i::fini (ACE_ENV_SINGLE_ARG_DECL) +ReconnectionCallback_i::fini (void) { if (this->id_is_valid_) { NotifyExt::ReconnectionRegistry_var registry = NotifyExt::ReconnectionRegistry::_narrow (this->ecf_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; registry->unregister_callback (this->callback_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->id_is_valid_ = false; } } @@ -756,22 +749,17 @@ ReconnectionCallback_i::init ( this->ecf_ = CosNotifyChannelAdmin::EventChannelFactory::_duplicate (ecf); PortableServer::ObjectId_var reconnection_callback_id = poa->activate_object (this ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::Object_var obj = poa->id_to_reference (reconnection_callback_id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; NotifyExt::ReconnectionCallback_var callback = NotifyExt::ReconnectionCallback::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; NotifyExt::ReconnectionRegistry_var registry = NotifyExt::ReconnectionRegistry::_narrow (ecf ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->callback_id_ = registry->register_callback (callback.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->id_is_valid_ = true; } @@ -918,7 +906,6 @@ void Consumer_Main::usage(FILE * out)const int Consumer_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) { this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); if (0 != this->parse_args(argc, argv)) { @@ -928,7 +915,6 @@ int Consumer_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) CORBA::Object_ptr poa_object = this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); if (CORBA::is_nil (poa_object)) { @@ -939,24 +925,19 @@ int Consumer_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) this->root_poa_ = PortableServer::POA::_narrow (poa_object ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); PortableServer::POAManager_var poa_manager = - root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + root_poa_->the_POAManager (); - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + poa_manager->activate (); if (this->use_naming_service_ ) { - this->find_notify_factory (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->find_notify_factory (); } else { - int ok = resolve_notify_factory (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + int ok = resolve_notify_factory (); if (!ok) { return -1; @@ -965,11 +946,9 @@ int Consumer_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) this->reconnecting_ = load_ids (); - init_event_channel (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + init_event_channel (); - init_consumer_admin (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + init_consumer_admin (); switch (this->mode_) { @@ -984,8 +963,7 @@ int Consumer_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) )); } this->structured_push_consumer_.set_expectations (this->expect_, this->fail_, this->serial_number_, this->verbose_); - init_structured_proxy_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + init_structured_proxy_supplier (); break; } case MODE_SEQUENCE: @@ -999,8 +977,7 @@ int Consumer_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) )); } this->sequence_push_consumer_.set_expectations (this->expect_, this->fail_, this->serial_number_, this->verbose_); - init_sequence_proxy_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + init_sequence_proxy_supplier (); break; } case MODE_ANY: @@ -1014,8 +991,7 @@ int Consumer_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) )); } this->any_push_consumer_.set_expectations (this->expect_, this->fail_, this->serial_number_, this->verbose_); - init_any_proxy_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + init_any_proxy_supplier (); break; } default: @@ -1031,7 +1007,6 @@ int Consumer_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) this->root_poa_.in (), this->ecf_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); save_ids (); return 0; @@ -1136,32 +1111,27 @@ Consumer_Main::reconnect ( } this->ecf_ = CosNotifyChannelAdmin::EventChannelFactory::_duplicate (dest_factory); this->reconnecting_ = true; - init_event_channel (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + init_event_channel (); - init_consumer_admin (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + init_consumer_admin (); switch (this->mode_) { case MODE_STRUCTURED: { - init_structured_proxy_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + init_structured_proxy_supplier (); break; } case MODE_SEQUENCE: { - init_sequence_proxy_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + init_sequence_proxy_supplier (); break; } case MODE_ANY : { - init_any_proxy_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + init_any_proxy_supplier (); break; } } @@ -1175,7 +1145,7 @@ Consumer_Main::reconnect ( int -Consumer_Main::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL) +Consumer_Main::resolve_naming_service (void) { // ignore redundant calls if (CORBA::is_nil (this->naming_context_.in ())) @@ -1183,22 +1153,19 @@ Consumer_Main::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL) CORBA::Object_var naming_obj = this->orb_->resolve_initial_references (NAMING_SERVICE_NAME ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN(0); this->naming_context_ = CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN(0); } return !CORBA::is_nil (this->naming_context_.in ()); } int -Consumer_Main::find_notify_factory (ACE_ENV_SINGLE_ARG_DECL) +Consumer_Main::find_notify_factory (void) { - int status = this->resolve_naming_service (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + int status = this->resolve_naming_service (); if (status) { CosNaming::Name name (1); @@ -1208,36 +1175,32 @@ Consumer_Main::find_notify_factory (ACE_ENV_SINGLE_ARG_DECL) CORBA::Object_var obj = this->naming_context_->resolve (name ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN(0); this->ecf_ = CosNotifyChannelAdmin::EventChannelFactory::_narrow ( obj.in () ACE_ENV_ARG_PARAMETER ); - ACE_CHECK_RETURN(0); } return ! CORBA::is_nil (this->ecf_.in ()); } int -Consumer_Main::resolve_notify_factory (ACE_ENV_SINGLE_ARG_DECL) +Consumer_Main::resolve_notify_factory (void) { CORBA::Object_var factory_obj = this->orb_->resolve_initial_references (NOTIFY_FACTORY_NAME ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN(0); this->ecf_ = CosNotifyChannelAdmin::EventChannelFactory::_narrow ( factory_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN(0); return ! CORBA::is_nil (this->ecf_.in ()); } void -Consumer_Main::init_event_channel (ACE_ENV_SINGLE_ARG_DECL) +Consumer_Main::init_event_channel (void) { bool ok = false; if (this->reconnecting_) @@ -1247,7 +1210,6 @@ Consumer_Main::init_event_channel (ACE_ENV_SINGLE_ARG_DECL) this->ec_ = this->ecf_->get_event_channel ( this->ec_id_ ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ok = ! CORBA::is_nil (this->ec_.in ()); if (ok && this->verbose_) { @@ -1345,7 +1307,6 @@ Consumer_Main::init_event_channel (ACE_ENV_SINGLE_ARG_DECL) adminprops, this->ec_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ok = ! CORBA::is_nil (ec_.in ()); if (ok && this->verbose_) { @@ -1371,7 +1332,7 @@ Consumer_Main::init_event_channel (ACE_ENV_SINGLE_ARG_DECL) CosNotifyChannelAdmin::AdminID default_admin_id = static_cast<CosNotifyChannelAdmin::AdminID>(-1); void -Consumer_Main::init_consumer_admin (ACE_ENV_SINGLE_ARG_DECL) +Consumer_Main::init_consumer_admin (void) { bool ok = false; if (this->reconnecting_) @@ -1380,7 +1341,7 @@ Consumer_Main::init_consumer_admin (ACE_ENV_SINGLE_ARG_DECL) { ACE_TRY_EX(TWO) { - this->sa_ = this->ec_->default_consumer_admin (ACE_ENV_SINGLE_ARG_PARAMETER); + this->sa_ = this->ec_->default_consumer_admin (); ACE_TRY_CHECK_EX(TWO); ok = ! CORBA::is_nil (this->sa_.in ()); this->sa_id_ = default_admin_id; @@ -1429,7 +1390,7 @@ Consumer_Main::init_consumer_admin (ACE_ENV_SINGLE_ARG_DECL) { ACE_TRY_EX(THREE) { - this->sa_ = this->ec_->default_consumer_admin (ACE_ENV_SINGLE_ARG_PARAMETER); + this->sa_ = this->ec_->default_consumer_admin (); ACE_TRY_CHECK_EX(THREE); ok = ! CORBA::is_nil (this->sa_.in ()); this->sa_id_ = default_admin_id; @@ -1457,7 +1418,6 @@ Consumer_Main::init_consumer_admin (ACE_ENV_SINGLE_ARG_DECL) CosNotifyChannelAdmin::OR_OP, this->sa_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ok = ! CORBA::is_nil (this->sa_.in ()); #ifdef TEST_SET_QOS @@ -1474,7 +1434,6 @@ Consumer_Main::init_consumer_admin (ACE_ENV_SINGLE_ARG_DECL) qosprops[i++].value <<= CosNotification::Persistent; // Required, or we won't persist much qosprops.length(i); this->sa_->set_qos (qosprops ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } #endif @@ -1496,7 +1455,7 @@ Consumer_Main::init_consumer_admin (ACE_ENV_SINGLE_ARG_DECL) } } void -Consumer_Main::init_structured_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) +Consumer_Main::init_structured_proxy_supplier (void) { bool ok = false; CosNotifyChannelAdmin::ProxySupplier_var proxy; @@ -1508,7 +1467,6 @@ Consumer_Main::init_structured_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) this->structured_proxy_id_ ACE_ENV_ARG_PARAMETER ); - ACE_TRY_CHECK; ok = ! CORBA::is_nil (proxy.in ()); if (ok && this->verbose_) { @@ -1530,7 +1488,6 @@ Consumer_Main::init_structured_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) CosNotifyChannelAdmin::STRUCTURED_EVENT, this->structured_proxy_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ok = ! CORBA::is_nil (proxy.in ()); if (ok && this->verbose_) { @@ -1542,7 +1499,6 @@ Consumer_Main::init_structured_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) } this->structured_proxy_push_supplier_ = CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow(proxy.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; if (CORBA::is_nil (this->structured_proxy_push_supplier_.in ())) { @@ -1557,15 +1513,12 @@ Consumer_Main::init_structured_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) PortableServer::ObjectId_var push_consumer_id = this->root_poa_->activate_object ( &(this->structured_push_consumer_) ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::Object_var obj = this->root_poa_->id_to_reference (push_consumer_id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->structured_push_consumer_ref_ = CosNotifyComm::StructuredPushConsumer::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } if (CORBA::is_nil (this->structured_push_consumer_ref_.in ())) @@ -1580,12 +1533,11 @@ Consumer_Main::init_structured_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) this->structured_proxy_push_supplier_->connect_structured_push_consumer ( this->structured_push_consumer_ref_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->structured_push_consumer_.set_connected(true); } void -Consumer_Main::init_sequence_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) +Consumer_Main::init_sequence_proxy_supplier (void) { bool ok = false; CosNotifyChannelAdmin::ProxySupplier_var proxy; @@ -1596,7 +1548,6 @@ Consumer_Main::init_sequence_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) proxy = this->sa_->get_proxy_supplier( this->sequence_proxy_id_ ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ok = ! CORBA::is_nil (proxy.in ()); if (ok && this->verbose_) { @@ -1618,14 +1569,12 @@ Consumer_Main::init_sequence_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) CosNotifyChannelAdmin::SEQUENCE_EVENT, this->sequence_proxy_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ok = ! CORBA::is_nil (proxy.in ()); #ifdef TEST_SET_QOS // temporary if (ok) { set_proxy_qos (proxy.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } #endif // TEST_SET_QOS if (ok && this->verbose_) @@ -1638,7 +1587,6 @@ Consumer_Main::init_sequence_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) } this->sequence_proxy_push_supplier_ = CosNotifyChannelAdmin::SequenceProxyPushSupplier::_narrow(proxy.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; if (CORBA::is_nil (this->sequence_proxy_push_supplier_.in ())) { @@ -1655,15 +1603,12 @@ Consumer_Main::init_sequence_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) PortableServer::ObjectId_var push_consumer_id = this->root_poa_->activate_object ( &(this->sequence_push_consumer_) ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::Object_var obj = this->root_poa_->id_to_reference (push_consumer_id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->sequence_push_consumer_ref_ = CosNotifyComm::SequencePushConsumer::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } if (CORBA::is_nil (this->sequence_push_consumer_ref_.in ())) { @@ -1677,7 +1622,6 @@ Consumer_Main::init_sequence_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) this->sequence_proxy_push_supplier_->connect_sequence_push_consumer ( this->sequence_push_consumer_ref_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->sequence_push_consumer_.set_connected(true); } @@ -1698,11 +1642,10 @@ Consumer_Main::set_proxy_qos (CosNotifyChannelAdmin::ProxySupplier_ptr proxy qosprops[i++].value <<= CosNotification::Persistent; // Required, or we won't persist much qosprops.length(i); proxy->set_qos (qosprops ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } void -Consumer_Main::init_any_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) +Consumer_Main::init_any_proxy_supplier (void) { bool ok = false; CosNotifyChannelAdmin::ProxySupplier_var proxy; @@ -1713,7 +1656,6 @@ Consumer_Main::init_any_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) proxy = this->sa_->get_proxy_supplier( this->any_proxy_id_ ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ok = ! CORBA::is_nil (proxy.in ()); if (ok && this->verbose_) { @@ -1754,7 +1696,6 @@ Consumer_Main::init_any_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) CosNotifyChannelAdmin::ANY_EVENT, this->any_proxy_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ok = ! CORBA::is_nil (proxy.in ()); if (ok && this->verbose_) @@ -1767,7 +1708,6 @@ Consumer_Main::init_any_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) } this->any_proxy_push_supplier_ = CosNotifyChannelAdmin::ProxyPushSupplier::_narrow(proxy.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; if (CORBA::is_nil (this->any_proxy_push_supplier_.in ())) { @@ -1782,15 +1722,12 @@ Consumer_Main::init_any_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) PortableServer::ObjectId_var push_consumer_id = this->root_poa_->activate_object ( &(this->any_push_consumer_) ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::Object_var obj = this->root_poa_->id_to_reference (push_consumer_id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->any_push_consumer_ref_ = CosNotifyComm::PushConsumer::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } if (CORBA::is_nil (this->any_push_consumer_ref_.in ())) @@ -1804,33 +1741,28 @@ Consumer_Main::init_any_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL) this->any_proxy_push_supplier_->connect_any_push_consumer ( this->any_push_consumer_ref_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->any_push_consumer_.set_connected(true); } -int Consumer_Main::fini (ACE_ENV_SINGLE_ARG_DECL) +int Consumer_Main::fini (void) { - this->reconnection_callback_.fini (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-4); - + this->reconnection_callback_.fini (); + if (this->disconnect_on_exit_) { if (!CORBA::is_nil (this->structured_proxy_push_supplier_.in ())) { - this->structured_proxy_push_supplier_->disconnect_structured_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-4); + this->structured_proxy_push_supplier_->disconnect_structured_push_supplier (); } if (!CORBA::is_nil (this->sequence_proxy_push_supplier_.in ())) { - this->sequence_proxy_push_supplier_->disconnect_sequence_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-4); + this->sequence_proxy_push_supplier_->disconnect_sequence_push_supplier (); } if (!CORBA::is_nil (this->any_proxy_push_supplier_.in ())) { - this->any_proxy_push_supplier_->disconnect_push_supplier (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-4); + this->any_proxy_push_supplier_->disconnect_push_supplier (); } if (!CORBA::is_nil (this->sa_.in ()) && this->sa_id_ != default_admin_id) { @@ -1849,7 +1781,7 @@ int Consumer_Main::fini (ACE_ENV_SINGLE_ARG_DECL) } -int Consumer_Main::run (ACE_ENV_SINGLE_ARG_DECL) +int Consumer_Main::run (void) { int result = 0; @@ -1860,7 +1792,6 @@ int Consumer_Main::run (ACE_ENV_SINGLE_ARG_DECL) { ACE_Time_Value tv(0, 100 * 1000); this->orb_->run(tv ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN(-1); } // see if consumers detected errors @@ -1885,13 +1816,11 @@ main (int argc, char *argv[]) if (result == 0) { - result = app.run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + result = app.run (); } if (result == 0) { - app.fini (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + app.fini (); } } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.h b/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.h index b6326ac31d7..3db09828745 100644 --- a/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.h +++ b/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.h @@ -174,7 +174,7 @@ public: CosNotifyChannelAdmin::EventChannelFactory_ptr ecf_ ACE_ENV_ARG_DECL); - void fini (ACE_ENV_SINGLE_ARG_DECL); + void fini (void); size_t reconnect_count () const; @@ -183,7 +183,7 @@ public: ACE_ENV_ARG_DECL ) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual CORBA::Boolean is_alive (ACE_ENV_SINGLE_ARG_DECL) + virtual CORBA::Boolean is_alive (void) ACE_THROW_SPEC ((CORBA::SystemException)); private: @@ -204,8 +204,8 @@ class Consumer_Main int parse_single_arg (int argc, char *argv[]); int init (int argc, char *argv[] ACE_ENV_ARG_DECL); - int run (ACE_ENV_SINGLE_ARG_DECL); - int fini (ACE_ENV_SINGLE_ARG_DECL); + int run (void); + int fini (void); void usage (FILE * log) const; void reconnect ( @@ -215,19 +215,19 @@ class Consumer_Main private: /// Find naming service. - int resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL); + int resolve_naming_service (void); /// Resolve the Notify factory from the Naming service. - int find_notify_factory (ACE_ENV_SINGLE_ARG_DECL); + int find_notify_factory (void); /// Resolve the Notify factory using resolve_initial_reference ("NotifyEventChannelFactory") - int resolve_notify_factory (ACE_ENV_SINGLE_ARG_DECL); + int resolve_notify_factory (void); - void init_event_channel (ACE_ENV_SINGLE_ARG_DECL); - void init_consumer_admin (ACE_ENV_SINGLE_ARG_DECL); - void init_structured_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL); - void init_sequence_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL); - void init_any_proxy_supplier (ACE_ENV_SINGLE_ARG_DECL); + void init_event_channel (void); + void init_consumer_admin (void); + void init_structured_proxy_supplier (void); + void init_sequence_proxy_supplier (void); + void init_any_proxy_supplier (void); void set_proxy_qos (CosNotifyChannelAdmin::ProxySupplier_ptr proxy ACE_ENV_ARG_DECL); diff --git a/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.cpp b/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.cpp index 1bd46703440..8bb82aa7548 100644 --- a/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.cpp @@ -135,11 +135,9 @@ ReconnectionCallback_i::reconnect ( ACE_TEXT ("(%P|%t) Supplier received reconnection request\n") )); this->ecf_ = CosNotifyChannelAdmin::EventChannelFactory::_narrow (reconnection ACE_ENV_ARG_PARAMETER); - ACE_CHECK; if (!CORBA::is_nil (this->ecf_.in ())) { this->supplier_main_.reconnect (this->ecf_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->reconnect_count_ += 1; } else @@ -151,7 +149,7 @@ ReconnectionCallback_i::reconnect ( } CORBA::Boolean -ReconnectionCallback_i::is_alive (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ReconnectionCallback_i::is_alive (void) ACE_THROW_SPEC ((CORBA::SystemException)) { return CORBA::Boolean (1); @@ -166,16 +164,14 @@ ReconnectionCallback_i::~ReconnectionCallback_i () void -ReconnectionCallback_i::fini (ACE_ENV_SINGLE_ARG_DECL) +ReconnectionCallback_i::fini (void) { if (this->id_is_valid_) { NotifyExt::ReconnectionRegistry_var registry = NotifyExt::ReconnectionRegistry::_narrow (this->ecf_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; registry->unregister_callback (this->callback_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->id_is_valid_ = false; } } @@ -189,22 +185,17 @@ ReconnectionCallback_i::init ( this->ecf_ = CosNotifyChannelAdmin::EventChannelFactory::_duplicate (ecf); PortableServer::ObjectId_var reconnection_callback_id = poa->activate_object (this ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::Object_var obj = poa->id_to_reference (reconnection_callback_id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; NotifyExt::ReconnectionCallback_var callback = NotifyExt::ReconnectionCallback::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; NotifyExt::ReconnectionRegistry_var registry = NotifyExt::ReconnectionRegistry::_narrow (ecf ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->callback_id_ = registry->register_callback (callback.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->id_is_valid_ = true; } @@ -349,7 +340,6 @@ void Supplier_Main::usage(FILE * log)const int Supplier_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) { this->orb_ = CORBA::ORB_init(argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); if (0 != this->parse_args(argc, argv)) { @@ -359,7 +349,6 @@ int Supplier_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) CORBA::Object_ptr poa_object = this->orb_->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); if (CORBA::is_nil (poa_object)) { @@ -370,24 +359,19 @@ int Supplier_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) this->root_poa_ = PortableServer::POA::_narrow (poa_object ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); PortableServer::POAManager_var poa_manager = - root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + root_poa_->the_POAManager (); - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + poa_manager->activate (); if (this->use_naming_service_ ) { - this->find_notify_factory (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->find_notify_factory (); } else { - int ok = resolve_notify_factory (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + int ok = resolve_notify_factory (); if (!ok) { return -1; @@ -396,31 +380,26 @@ int Supplier_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) this->reconnecting_ = load_ids (); - init_event_channel (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + init_event_channel (); - init_supplier_admin (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + init_supplier_admin (); switch (this->mode_) { case MODE_STRUCTURED: { - init_structured_proxy_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + init_structured_proxy_consumer (); break; } case MODE_SEQUENCE: { - init_sequence_proxy_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + init_sequence_proxy_consumer (); break; } case MODE_ANY: { - init_any_proxy_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + init_any_proxy_consumer (); break; } default: @@ -435,7 +414,6 @@ int Supplier_Main::init (int argc, char *argv[] ACE_ENV_ARG_DECL) this->root_poa_.in (), this->ecf_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); save_ids (); return 0; @@ -534,30 +512,25 @@ Supplier_Main::reconnect ( { this->ecf_ = CosNotifyChannelAdmin::EventChannelFactory::_duplicate (dest_factory); this->reconnecting_ = true; - init_event_channel (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + init_event_channel (); - init_supplier_admin (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + init_supplier_admin (); switch (this->mode_) { case MODE_STRUCTURED: { - init_structured_proxy_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + init_structured_proxy_consumer (); break; } case MODE_SEQUENCE: { - init_sequence_proxy_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + init_sequence_proxy_consumer (); break; } case MODE_ANY: { - init_any_proxy_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + init_any_proxy_consumer (); break; } } @@ -565,7 +538,7 @@ Supplier_Main::reconnect ( int -Supplier_Main::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL) +Supplier_Main::resolve_naming_service (void) { // ignore redundant calls if (CORBA::is_nil (this->naming_context_.in ())) @@ -573,22 +546,19 @@ Supplier_Main::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL) CORBA::Object_var naming_obj = this->orb_->resolve_initial_references (NAMING_SERVICE_NAME ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN(0); this->naming_context_ = CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN(0); } return !CORBA::is_nil (this->naming_context_.in ()); } int -Supplier_Main::find_notify_factory (ACE_ENV_SINGLE_ARG_DECL) +Supplier_Main::find_notify_factory (void) { - int status = this->resolve_naming_service (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + int status = this->resolve_naming_service (); if (status) { CosNaming::Name name (1); @@ -598,36 +568,32 @@ Supplier_Main::find_notify_factory (ACE_ENV_SINGLE_ARG_DECL) CORBA::Object_var obj = this->naming_context_->resolve (name ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN(0); this->ecf_ = CosNotifyChannelAdmin::EventChannelFactory::_narrow ( obj.in () ACE_ENV_ARG_PARAMETER ); - ACE_CHECK_RETURN(0); } return ! CORBA::is_nil (this->ecf_.in ()); } int -Supplier_Main::resolve_notify_factory (ACE_ENV_SINGLE_ARG_DECL) +Supplier_Main::resolve_notify_factory (void) { CORBA::Object_var factory_obj = this->orb_->resolve_initial_references (NOTIFY_FACTORY_NAME ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN(0); this->ecf_ = CosNotifyChannelAdmin::EventChannelFactory::_narrow ( factory_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN(0); return ! CORBA::is_nil (this->ecf_.in ()); } void -Supplier_Main::init_event_channel (ACE_ENV_SINGLE_ARG_DECL) +Supplier_Main::init_event_channel (void) { bool ok = false; if (this->reconnecting_) @@ -637,7 +603,6 @@ Supplier_Main::init_event_channel (ACE_ENV_SINGLE_ARG_DECL) this->ec_ = this->ecf_->get_event_channel ( this->ec_id_ ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ok = ! CORBA::is_nil (this->ec_.in ()); if (ok && this->verbose_) { @@ -735,7 +700,6 @@ Supplier_Main::init_event_channel (ACE_ENV_SINGLE_ARG_DECL) adminprops, this->ec_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ok = ! CORBA::is_nil (ec_.in ()); if (ok && this->verbose_) { @@ -761,7 +725,7 @@ Supplier_Main::init_event_channel (ACE_ENV_SINGLE_ARG_DECL) CosNotifyChannelAdmin::AdminID default_admin_id = static_cast<CosNotifyChannelAdmin::AdminID>(-1); void -Supplier_Main::init_supplier_admin (ACE_ENV_SINGLE_ARG_DECL) +Supplier_Main::init_supplier_admin (void) { bool ok = false; if (this->reconnecting_ && this->sa_id_ != default_admin_id) @@ -791,7 +755,7 @@ Supplier_Main::init_supplier_admin (ACE_ENV_SINGLE_ARG_DECL) { ACE_TRY_EX(TWO) { - this->sa_ = this->ec_->default_supplier_admin (ACE_ENV_SINGLE_ARG_PARAMETER); + this->sa_ = this->ec_->default_supplier_admin (); ACE_TRY_CHECK_EX(TWO); ok = ! CORBA::is_nil (this->sa_.in ()); this->sa_id_ = default_admin_id; @@ -820,7 +784,6 @@ Supplier_Main::init_supplier_admin (ACE_ENV_SINGLE_ARG_DECL) CosNotifyChannelAdmin::OR_OP, this->sa_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ok = ! CORBA::is_nil (this->sa_.in ()); if (ok && this->verbose_) { @@ -833,7 +796,7 @@ Supplier_Main::init_supplier_admin (ACE_ENV_SINGLE_ARG_DECL) } void -Supplier_Main::init_structured_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) +Supplier_Main::init_structured_proxy_consumer (void) { bool ok = false; CosNotifyChannelAdmin::ProxyConsumer_var proxy; @@ -845,7 +808,6 @@ Supplier_Main::init_structured_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) this->structured_proxy_id_ ACE_ENV_ARG_PARAMETER ); - ACE_TRY_CHECK; ok = ! CORBA::is_nil (proxy.in ()); if (ok && this->verbose_) { @@ -867,7 +829,6 @@ Supplier_Main::init_structured_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) CosNotifyChannelAdmin::STRUCTURED_EVENT, this->structured_proxy_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ok = ! CORBA::is_nil (proxy.in ()); if (ok && this->verbose_) { @@ -879,7 +840,6 @@ Supplier_Main::init_structured_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) } this->structured_proxy_push_consumer_ = CosNotifyChannelAdmin::StructuredProxyPushConsumer::_narrow(proxy.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; if (CORBA::is_nil (this->structured_proxy_push_consumer_.in ())) { @@ -893,15 +853,12 @@ Supplier_Main::init_structured_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) PortableServer::ObjectId_var push_supplier_id = this->root_poa_->activate_object ( &(this->structured_push_supplier_) ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::Object_var obj = this->root_poa_->id_to_reference (push_supplier_id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->structured_push_supplier_ref_ = CosNotifyComm::StructuredPushSupplier::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } if (CORBA::is_nil (structured_push_supplier_ref_.in ())) { @@ -916,11 +873,10 @@ Supplier_Main::init_structured_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) this->structured_proxy_push_consumer_->connect_structured_push_supplier ( structured_push_supplier_ref_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } void -Supplier_Main::init_sequence_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) +Supplier_Main::init_sequence_proxy_consumer (void) { bool ok = false; CosNotifyChannelAdmin::ProxyConsumer_var proxy; @@ -931,7 +887,6 @@ Supplier_Main::init_sequence_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) proxy = this->sa_->get_proxy_consumer( this->sequence_proxy_id_ ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ok = ! CORBA::is_nil (proxy.in ()); if (ok && this->verbose_) { @@ -953,7 +908,6 @@ Supplier_Main::init_sequence_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) CosNotifyChannelAdmin::SEQUENCE_EVENT, this->sequence_proxy_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ok = ! CORBA::is_nil (proxy.in ()); if (ok && this->verbose_) { @@ -965,7 +919,6 @@ Supplier_Main::init_sequence_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) } this->sequence_proxy_push_consumer_ = CosNotifyChannelAdmin::SequenceProxyPushConsumer::_narrow(proxy.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; if (CORBA::is_nil (this->sequence_proxy_push_consumer_.in ())) { @@ -981,15 +934,12 @@ Supplier_Main::init_sequence_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) PortableServer::ObjectId_var push_supplier_id = this->root_poa_->activate_object ( &(this->sequence_push_supplier_) ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::Object_var obj = this->root_poa_->id_to_reference (push_supplier_id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->sequence_push_supplier_ref_ = CosNotifyComm::SequencePushSupplier::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } if (CORBA::is_nil (sequence_push_supplier_ref_.in ())) { @@ -1003,11 +953,10 @@ Supplier_Main::init_sequence_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) this->sequence_proxy_push_consumer_->connect_sequence_push_supplier ( sequence_push_supplier_ref_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } void -Supplier_Main::init_any_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) +Supplier_Main::init_any_proxy_consumer (void) { bool ok = false; CosNotifyChannelAdmin::ProxyConsumer_var proxy; @@ -1018,7 +967,6 @@ Supplier_Main::init_any_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) proxy = this->sa_->get_proxy_consumer( this->any_proxy_id_ ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; ok = ! CORBA::is_nil (proxy.in ()); if (ok && this->verbose_) { @@ -1040,7 +988,6 @@ Supplier_Main::init_any_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) CosNotifyChannelAdmin::ANY_EVENT, this->any_proxy_id_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ok = ! CORBA::is_nil (proxy.in ()); if (ok && this->verbose_) { @@ -1052,7 +999,6 @@ Supplier_Main::init_any_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) } this->any_proxy_push_consumer_ = CosNotifyChannelAdmin::ProxyPushConsumer::_narrow(proxy.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; if (CORBA::is_nil (this->any_proxy_push_consumer_.in ())) { @@ -1068,15 +1014,12 @@ Supplier_Main::init_any_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) PortableServer::ObjectId_var push_supplier_id = this->root_poa_->activate_object ( &(this->any_push_supplier_) ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::Object_var obj = this->root_poa_->id_to_reference (push_supplier_id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->any_push_supplier_ref_ = CosNotifyComm::PushSupplier::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } if (CORBA::is_nil (any_push_supplier_ref_.in ())) { @@ -1090,15 +1033,13 @@ Supplier_Main::init_any_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL) this->any_proxy_push_consumer_->connect_any_push_supplier ( any_push_supplier_ref_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } -int Supplier_Main::fini (ACE_ENV_SINGLE_ARG_DECL) +int Supplier_Main::fini (void) { if (this->disconnect_on_exit_) { - this->reconnection_callback_.fini (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-4); + this->reconnection_callback_.fini (); if (!CORBA::is_nil (this->structured_proxy_push_consumer_.in ())) { if (this->verbose_) @@ -1107,8 +1048,7 @@ int Supplier_Main::fini (ACE_ENV_SINGLE_ARG_DECL) ACE_TEXT ("(%P|%t) Disconnecting structured\n") )); } - this->structured_proxy_push_consumer_->disconnect_structured_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-4); + this->structured_proxy_push_consumer_->disconnect_structured_push_consumer (); } if (!CORBA::is_nil (this->sequence_proxy_push_consumer_.in ())) { @@ -1118,8 +1058,7 @@ int Supplier_Main::fini (ACE_ENV_SINGLE_ARG_DECL) ACE_TEXT ("(%P|%t) Disconnecting sequence\n") )); } - this->sequence_proxy_push_consumer_->disconnect_sequence_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-4); + this->sequence_proxy_push_consumer_->disconnect_sequence_push_consumer (); } if (!CORBA::is_nil (this->any_proxy_push_consumer_.in ())) { @@ -1129,8 +1068,7 @@ int Supplier_Main::fini (ACE_ENV_SINGLE_ARG_DECL) ACE_TEXT ("(%P|%t) Disconnecting any\n") )); } - this->any_proxy_push_consumer_->disconnect_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-4); + this->any_proxy_push_consumer_->disconnect_push_consumer (); } if (!CORBA::is_nil (this->sa_.in ()) && this->sa_id_ != default_admin_id) { @@ -1148,7 +1086,7 @@ int Supplier_Main::fini (ACE_ENV_SINGLE_ARG_DECL) return 0; } -void Supplier_Main::send_structured_event (ACE_ENV_SINGLE_ARG_DECL) +void Supplier_Main::send_structured_event (void) { CosNotification::StructuredEvent event; @@ -1193,10 +1131,9 @@ void Supplier_Main::send_structured_event (ACE_ENV_SINGLE_ARG_DECL) this->structured_proxy_push_consumer_->push_structured_event (event ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } -void Supplier_Main::send_sequence_event (ACE_ENV_SINGLE_ARG_DECL) +void Supplier_Main::send_sequence_event (void) { CosNotification::EventBatch event_batch(1); event_batch.length (1); @@ -1243,10 +1180,9 @@ void Supplier_Main::send_sequence_event (ACE_ENV_SINGLE_ARG_DECL) this->sequence_proxy_push_consumer_->push_structured_events (event_batch ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } -void Supplier_Main::send_any_event (ACE_ENV_SINGLE_ARG_DECL) +void Supplier_Main::send_any_event (void) { CORBA::Any event; event <<= CORBA::ULong (this->serial_number_); @@ -1261,10 +1197,9 @@ void Supplier_Main::send_any_event (ACE_ENV_SINGLE_ARG_DECL) this->any_proxy_push_consumer_->push (event ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } -int Supplier_Main::run (ACE_ENV_SINGLE_ARG_DECL) +int Supplier_Main::run (void) { int result = 0; bool paused = false; @@ -1316,20 +1251,17 @@ int Supplier_Main::run (ACE_ENV_SINGLE_ARG_DECL) { case MODE_STRUCTURED: { - send_structured_event (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + send_structured_event (); break; } case MODE_SEQUENCE: { - send_sequence_event (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + send_sequence_event (); break; } case MODE_ANY: { - send_any_event (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + send_any_event (); break; } } @@ -1353,13 +1285,11 @@ main (int argc, char *argv[]) if (result == 0) { - result = app.run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + result = app.run (); } if (result == 0) { - app.fini (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + app.fini (); } } ACE_CATCHANY diff --git a/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.h b/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.h index f429cf7892c..4e7659b35f3 100644 --- a/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.h +++ b/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.h @@ -86,7 +86,7 @@ public: CosNotifyChannelAdmin::EventChannelFactory_ptr ecf_ ACE_ENV_ARG_DECL); - void fini (ACE_ENV_SINGLE_ARG_DECL); + void fini (void); size_t reconnect_count () const; @@ -95,7 +95,7 @@ public: ACE_ENV_ARG_DECL ) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual CORBA::Boolean is_alive (ACE_ENV_SINGLE_ARG_DECL) + virtual CORBA::Boolean is_alive (void) ACE_THROW_SPEC ((CORBA::SystemException)); private: @@ -116,8 +116,8 @@ class Supplier_Main int parse_single_arg (int argc, char *argv[]); int init (int argc, char *argv[] ACE_ENV_ARG_DECL); - int run (ACE_ENV_SINGLE_ARG_DECL); - int fini (ACE_ENV_SINGLE_ARG_DECL); + int run (void); + int fini (void); void usage (FILE * log) const; void reconnect ( @@ -127,24 +127,24 @@ class Supplier_Main private: /// Find naming service. - int resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL); + int resolve_naming_service (void); /// Resolve the Notify factory from the Naming service. - int find_notify_factory (ACE_ENV_SINGLE_ARG_DECL); + int find_notify_factory (void); /// Resolve the Notify factory using resolve_initial_reference ("NotifyEventChannelFactory") - int resolve_notify_factory (ACE_ENV_SINGLE_ARG_DECL); + int resolve_notify_factory (void); - void init_event_channel (ACE_ENV_SINGLE_ARG_DECL); - void init_supplier_admin (ACE_ENV_SINGLE_ARG_DECL); - void init_structured_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL); - void init_sequence_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL); - void init_any_proxy_consumer (ACE_ENV_SINGLE_ARG_DECL); + void init_event_channel (void); + void init_supplier_admin (void); + void init_structured_proxy_consumer (void); + void init_sequence_proxy_consumer (void); + void init_any_proxy_consumer (void); /// send events. - void send_structured_event (ACE_ENV_SINGLE_ARG_DECL); - void send_sequence_event (ACE_ENV_SINGLE_ARG_DECL); - void send_any_event (ACE_ENV_SINGLE_ARG_DECL); + void send_structured_event (void); + void send_sequence_event (void); + void send_any_event (void); void save_ids(); bool load_ids(); |