diff options
author | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-11-07 06:27:08 +0000 |
---|---|---|
committer | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-11-07 06:27:08 +0000 |
commit | 99cbc311af6fbcbcea22fe381933facecdb3dc8e (patch) | |
tree | 36057c580cb1699085e06ebe8c887c5e9a72cd93 /TAO | |
parent | 96e66085d0c9eb0f5361b0cd962b5b7f80eae654 (diff) | |
download | ATCD-99cbc311af6fbcbcea22fe381933facecdb3dc8e.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/examples/Event_Comm/Consumer_Input_Handler.cpp | 19 | ||||
-rw-r--r-- | TAO/examples/Event_Comm/Consumer_Input_Handler.h | 3 | ||||
-rw-r--r-- | TAO/examples/Event_Comm/Notifier_Handler.cpp | 4 | ||||
-rw-r--r-- | TAO/examples/Event_Comm/Notifier_Handler.h | 2 | ||||
-rw-r--r-- | TAO/examples/Event_Comm/Supplier_Input_Handler.cpp | 4 | ||||
-rw-r--r-- | TAO/examples/Event_Comm/Supplier_Input_Handler.h | 3 | ||||
-rw-r--r-- | TAO/examples/Event_Comm/consumer.cpp | 5 | ||||
-rw-r--r-- | TAO/examples/Event_Comm/supplier.cpp | 3 |
8 files changed, 19 insertions, 24 deletions
diff --git a/TAO/examples/Event_Comm/Consumer_Input_Handler.cpp b/TAO/examples/Event_Comm/Consumer_Input_Handler.cpp index e0da5b9d714..15c56be1d7a 100644 --- a/TAO/examples/Event_Comm/Consumer_Input_Handler.cpp +++ b/TAO/examples/Event_Comm/Consumer_Input_Handler.cpp @@ -15,7 +15,7 @@ Consumer_Input_Handler::Consumer_Input_Handler (void) Consumer_Input_Handler::~Consumer_Input_Handler (void) { - // No-Op. + //this->close (); } int @@ -31,7 +31,7 @@ Consumer_Input_Handler::consumer_initiated_shutdown (int c) } int -Consumer_Input_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) +Consumer_Input_Handler::close (void) { ACE_DEBUG ((LM_DEBUG, "closing down Consumer::Input_Handler\n")); @@ -50,6 +50,7 @@ Consumer_Input_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) { // Gracefully shutdown the Receiver by removing it from the // Notifier's internal map. + if (notifier != 0) notifier->unsubscribe (receiver, "", @@ -63,13 +64,13 @@ Consumer_Input_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) TAO_ENDTRY; } - // Make sure to cleanup the STDIN handler. - if (ACE_Event_Handler::remove_stdin_handler - (TAO_ORB_Core_instance ()->reactor (), - TAO_ORB_Core_instance ()->thr_mgr ()) == -1) - ACE_ERROR ((LM_ERROR, - "%p\n", - "remove_stdin_handler")); + // Make sure to cleanup the STDIN handler. + if (ACE_Event_Handler::remove_stdin_handler + (TAO_ORB_Core_instance ()->reactor (), + TAO_ORB_Core_instance ()->thr_mgr ()) == -1) + ACE_ERROR ((LM_ERROR, + "%p\n", + "remove_stdin_handler")); return 0; } diff --git a/TAO/examples/Event_Comm/Consumer_Input_Handler.h b/TAO/examples/Event_Comm/Consumer_Input_Handler.h index 55b95c8fd42..c4325081fbb 100644 --- a/TAO/examples/Event_Comm/Consumer_Input_Handler.h +++ b/TAO/examples/Event_Comm/Consumer_Input_Handler.h @@ -50,8 +50,7 @@ public: virtual int handle_input (ACE_HANDLE); // Dispatch the callback when events occur. - virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE, - ACE_Reactor_Mask = ACE_Event_Handler::NULL_MASK); + int close (void); // Close down the handler. int consumer_initiated_shutdown (void); diff --git a/TAO/examples/Event_Comm/Notifier_Handler.cpp b/TAO/examples/Event_Comm/Notifier_Handler.cpp index 342832030a2..0c8683b1bee 100644 --- a/TAO/examples/Event_Comm/Notifier_Handler.cpp +++ b/TAO/examples/Event_Comm/Notifier_Handler.cpp @@ -13,11 +13,11 @@ Notifier_Handler::Notifier_Handler (void) Notifier_Handler::~Notifier_Handler (void) { - this->handle_close (); + this->close (); } int -Notifier_Handler::handle_close (void) +Notifier_Handler::close (void) { if (this->notifier_ != 0) { diff --git a/TAO/examples/Event_Comm/Notifier_Handler.h b/TAO/examples/Event_Comm/Notifier_Handler.h index a7aa2427e6c..a3915c30562 100644 --- a/TAO/examples/Event_Comm/Notifier_Handler.h +++ b/TAO/examples/Event_Comm/Notifier_Handler.h @@ -49,7 +49,7 @@ public: Event_Comm::Notifier *notifier (void); void notifier (Event_Comm::Notifier *); - virtual int handle_close (void); + int close (void); // Close down the handler. private: diff --git a/TAO/examples/Event_Comm/Supplier_Input_Handler.cpp b/TAO/examples/Event_Comm/Supplier_Input_Handler.cpp index be7245f3dce..f6513ebc7ef 100644 --- a/TAO/examples/Event_Comm/Supplier_Input_Handler.cpp +++ b/TAO/examples/Event_Comm/Supplier_Input_Handler.cpp @@ -17,10 +17,11 @@ Supplier_Input_Handler::~Supplier_Input_Handler (void) { ACE_DEBUG ((LM_DEBUG, "closing down Supplier_Input_Handler::~Supplier_Input_Handler\n")); + this->close (); } int -Supplier_Input_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) +Supplier_Input_Handler::close (void) { ACE_DEBUG ((LM_DEBUG, "closing down Supplier::Supplier_Input_Handler\n")); @@ -32,7 +33,6 @@ Supplier_Input_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) ACE_ERROR ((LM_ERROR, "%p\n", "remove_stdin_handler")); - return 0; } diff --git a/TAO/examples/Event_Comm/Supplier_Input_Handler.h b/TAO/examples/Event_Comm/Supplier_Input_Handler.h index 6f9af949f80..706e4bc77b7 100644 --- a/TAO/examples/Event_Comm/Supplier_Input_Handler.h +++ b/TAO/examples/Event_Comm/Supplier_Input_Handler.h @@ -53,8 +53,7 @@ public: virtual int handle_input (ACE_HANDLE); // Frame input events and notify <Consumers>. - virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE, - ACE_Reactor_Mask = ACE_Event_Handler::NULL_MASK); + int close (void); // Close down the handler. protected: diff --git a/TAO/examples/Event_Comm/consumer.cpp b/TAO/examples/Event_Comm/consumer.cpp index f94e7199450..b0b9906c2cf 100644 --- a/TAO/examples/Event_Comm/consumer.cpp +++ b/TAO/examples/Event_Comm/consumer.cpp @@ -45,8 +45,7 @@ Consumer::Consumer (void) Consumer::~Consumer (void) { - // Allow the handlers to clean up. - this->ih_.handle_close (); + // No-Op. } int @@ -62,6 +61,7 @@ Consumer::handle_signal (int signum, this->ih_.consumer_initiated_shutdown (1); // Shut down the ORB + ih_.close (); ch_.close (); return 0; @@ -71,7 +71,6 @@ int Consumer::run (void) { // Run the <Consumer_Handler>'s ORB. - return ch_.run (); } diff --git a/TAO/examples/Event_Comm/supplier.cpp b/TAO/examples/Event_Comm/supplier.cpp index 5d2f9e6d65e..9831b24380e 100644 --- a/TAO/examples/Event_Comm/supplier.cpp +++ b/TAO/examples/Event_Comm/supplier.cpp @@ -57,9 +57,6 @@ Supplier::handle_signal (int signum, siginfo_t *, ucontext_t *) "%S\n", signum)); - this->ih_.handle_close (); - this->nh_.handle_close (); - ACE_Reactor::end_event_loop (); return 0; } |