diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp index 2c974ab3de6..afb8a600721 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Periodic_Consumer.cpp @@ -124,13 +124,13 @@ TAO_NS_Periodic_Consumer::push_structured_event (const CosNotification::Structur CORBA::INTERNAL ()); ACE_CHECK; + const CosNotification::PropertySeq& prop_seq = notification.header.variable_header; + if (this->count_ == -1) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "(%P, %t)Consumer %s received inital (-1)th event \n", this->name_.c_str ())); - const CosNotification::PropertySeq& prop_seq = notification.header.variable_header; - for (CORBA::ULong i = 0; i < prop_seq.length (); ++i) { if (ACE_OS::strcmp (prop_seq[i].name.in (), "BaseTime") == 0) @@ -169,8 +169,6 @@ TAO_NS_Periodic_Consumer::push_structured_event (const CosNotification::Structur if (this->check_priority_) { // Check if the event carries a Priority. - const CosNotification::PropertySeq& prop_seq = notification.header.variable_header; - int event_has_priority_set = 0; CORBA::Short event_priority = 0; @@ -222,6 +220,14 @@ TAO_NS_Periodic_Consumer::push_structured_event (const CosNotification::Structur } } + for (CORBA::ULong i = 0; i < prop_seq.length (); ++i) + { + if (ACE_OS::strcmp (prop_seq[i].name.in (), "Stop") == 0) + { + this->count_ = this->max_count_; // force the count to reach max as we've run out of time. + } + } + TimeBase::TimeT send_time, now; ACE_hrtime_t send_time_hrtime; |