summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2005-03-24 09:14:56 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2005-03-24 09:14:56 +0000
commit7b0c94b877b027e33c9e3f6e7b1fa3f86e289e3c (patch)
tree47aa29d23e8d48eecd52fd3214f238e34a67dfc6 /TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp
parent7f7ad3f214c154a03c85e22d54df9e5566a8620d (diff)
downloadATCD-7b0c94b877b027e33c9e3f6e7b1fa3f86e289e3c.tar.gz
ChangeLogTag: Thu Mar 24 09:14:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp b/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp
index ac9c1e18bfe..26be3c2f02d 100644
--- a/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp
@@ -19,6 +19,9 @@ TAO_ECG_Reactive_ConsumerEC_Control::
adapter_ (this),
gateway_ (gateway),
orb_ (CORBA::ORB::_duplicate (orb))
+#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
+ , timer_id_ (-1)
+#endif /* TAO_HAS_CORBA_MESSAGING != 0*/
{
this->reactor_ =
this->orb_->orb_core ()->reactor ();
@@ -151,11 +154,11 @@ TAO_ECG_Reactive_ConsumerEC_Control::activate (void)
// Schedule the timer after these policies has been set, because the
// handle_timeout uses these policies, if done in front, the channel
// can crash when the timeout expires before initiazation is ready.
- long id = this->reactor_->schedule_timer (&this->adapter_,
- 0,
- this->rate_,
- this->rate_);
- if (id == -1)
+ timer_id_ = this->reactor_->schedule_timer (&this->adapter_,
+ 0,
+ this->rate_,
+ this->rate_);
+ if (timer_id_ == -1)
return -1;
}
}
@@ -172,9 +175,12 @@ TAO_ECG_Reactive_ConsumerEC_Control::activate (void)
int
TAO_ECG_Reactive_ConsumerEC_Control::shutdown (void)
{
- int r =
- this->reactor_->remove_handler (&this->adapter_,
- ACE_Event_Handler::DONT_CALL);
+ int r = 0;
+
+#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
+ r = this->reactor_->cancel_timer (timer_id_);
+#endif /* TAO_HAS_CORBA_MESSAGING */
+
this->adapter_.reactor (0);
return r;
}