diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-22 22:53:02 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-22 22:53:02 +0000 |
commit | 2468370eb99901af86fb184a379e6ce220b3cf27 (patch) | |
tree | 800544c6d26be1590e3d848ab2e01e659ffbd195 /TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp | |
parent | 044ddce8229cb5cf5f1134dbd2d460994f5851d1 (diff) | |
download | ATCD-2468370eb99901af86fb184a379e6ce220b3cf27.tar.gz |
ChangeLogTag:Sat May 22 17:50:12 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp | 83 |
1 files changed, 51 insertions, 32 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp index 994683d9279..ac02d5b112f 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp @@ -86,18 +86,21 @@ TAO_EC_Basic_ObserverStrategy::append_observer ( RtecEventChannel::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannel::EventChannel::CANT_APPEND_OBSERVER)) { - ACE_GUARD_THROW_EX (ACE_Lock, ace_mon, *this->lock_, - RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR()); - ACE_CHECK_RETURN (0); + { + ACE_GUARD_THROW_EX ( + ACE_Lock, ace_mon, *this->lock_, + RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR()); + ACE_CHECK_RETURN (0); - this->handle_generator_++; - Observer_Entry entry (this->handle_generator_, - RtecEventChannelAdmin::Observer::_duplicate (obs)); + this->handle_generator_++; + Observer_Entry entry (this->handle_generator_, + RtecEventChannelAdmin::Observer::_duplicate (obs)); - if (this->observers_.bind (entry.handle, entry) == -1) - ACE_THROW_RETURN ( - RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER(), - 0); + if (this->observers_.bind (entry.handle, entry) == -1) + ACE_THROW_RETURN ( + RtecEventChannelAdmin::EventChannel::CANT_APPEND_OBSERVER(), + 0); + } RtecEventChannelAdmin::ConsumerQOS c_qos; this->fill_qos (c_qos, ACE_TRY_ENV); @@ -133,11 +136,15 @@ TAO_EC_Basic_ObserverStrategy::remove_observer ( } void -TAO_EC_Basic_ObserverStrategy::connected (TAO_EC_ProxyPushConsumer*, - CORBA::Environment &ACE_TRY_ENV) +TAO_EC_Basic_ObserverStrategy::connected ( + TAO_EC_ProxyPushConsumer *consumer, + CORBA::Environment &ACE_TRY_ENV) { - RtecEventChannelAdmin::ConsumerQOS c_qos; - this->fill_qos (c_qos, ACE_TRY_ENV); + if (consumer->publications ().is_gateway) + return; + + RtecEventChannelAdmin::SupplierQOS s_qos; + this->fill_qos (s_qos, ACE_TRY_ENV); ACE_CHECK; int size = 0; @@ -165,17 +172,21 @@ TAO_EC_Basic_ObserverStrategy::connected (TAO_EC_ProxyPushConsumer*, for (int i = 0; i != size; ++i) { - copy[i]->update_consumer (c_qos, ACE_TRY_ENV); + copy[i]->update_supplier (s_qos, ACE_TRY_ENV); ACE_CHECK; } } void -TAO_EC_Basic_ObserverStrategy::disconnected (TAO_EC_ProxyPushConsumer*, - CORBA::Environment &ACE_TRY_ENV) +TAO_EC_Basic_ObserverStrategy::disconnected ( + TAO_EC_ProxyPushConsumer* consumer, + CORBA::Environment &ACE_TRY_ENV) { - RtecEventChannelAdmin::ConsumerQOS c_qos; - this->fill_qos (c_qos, ACE_TRY_ENV); + if (consumer->publications ().is_gateway) + return; + + RtecEventChannelAdmin::SupplierQOS s_qos; + this->fill_qos (s_qos, ACE_TRY_ENV); ACE_CHECK; int size = 0; @@ -203,17 +214,21 @@ TAO_EC_Basic_ObserverStrategy::disconnected (TAO_EC_ProxyPushConsumer*, for (int i = 0; i != size; ++i) { - copy[i]->update_consumer (c_qos, ACE_TRY_ENV); + copy[i]->update_supplier (s_qos, ACE_TRY_ENV); ACE_CHECK; } } void -TAO_EC_Basic_ObserverStrategy::connected (TAO_EC_ProxyPushSupplier*, - CORBA::Environment &ACE_TRY_ENV) +TAO_EC_Basic_ObserverStrategy::connected ( + TAO_EC_ProxyPushSupplier* supplier, + CORBA::Environment &ACE_TRY_ENV) { - RtecEventChannelAdmin::SupplierQOS s_qos; - this->fill_qos (s_qos, ACE_TRY_ENV); + if (supplier->subscriptions ().is_gateway) + return; + + RtecEventChannelAdmin::ConsumerQOS c_qos; + this->fill_qos (c_qos, ACE_TRY_ENV); ACE_CHECK; int size = 0; @@ -241,17 +256,21 @@ TAO_EC_Basic_ObserverStrategy::connected (TAO_EC_ProxyPushSupplier*, for (int i = 0; i != size; ++i) { - copy[i]->update_supplier (s_qos, ACE_TRY_ENV); + copy[i]->update_consumer (c_qos, ACE_TRY_ENV); ACE_CHECK; } } void -TAO_EC_Basic_ObserverStrategy::disconnected (TAO_EC_ProxyPushSupplier*, - CORBA::Environment &ACE_TRY_ENV) +TAO_EC_Basic_ObserverStrategy::disconnected ( + TAO_EC_ProxyPushSupplier* supplier, + CORBA::Environment &ACE_TRY_ENV) { - RtecEventChannelAdmin::SupplierQOS s_qos; - this->fill_qos (s_qos, ACE_TRY_ENV); + if (supplier->subscriptions ().is_gateway) + return; + + RtecEventChannelAdmin::ConsumerQOS c_qos; + this->fill_qos (c_qos, ACE_TRY_ENV); ACE_CHECK; int size = 0; @@ -279,7 +298,7 @@ TAO_EC_Basic_ObserverStrategy::disconnected (TAO_EC_ProxyPushSupplier*, for (int i = 0; i != size; ++i) { - copy[i]->update_supplier (s_qos, ACE_TRY_ENV); + copy[i]->update_consumer (c_qos, ACE_TRY_ENV); ACE_CHECK; } } @@ -316,7 +335,7 @@ TAO_EC_Basic_ObserverStrategy::fill_qos ( sub.dependencies[j].event; RtecEventComm::EventType type = event.header.type; - if (0 <= type && type <= ACE_ES_EVENT_UNDEFINED) + if (0 < type && type < ACE_ES_EVENT_UNDEFINED) continue; headers.insert (event.header, 1); } @@ -371,7 +390,7 @@ TAO_EC_Basic_ObserverStrategy::fill_qos ( pub.publications[j].event; RtecEventComm::EventType type = event.header.type; - if (0 <= type && type <= ACE_ES_EVENT_UNDEFINED) + if (0 < type && type < ACE_ES_EVENT_UNDEFINED) continue; headers.insert (event.header, 1); } |