diff options
author | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-11-01 00:46:52 +0000 |
---|---|---|
committer | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-11-01 00:46:52 +0000 |
commit | ddb4b50cde6ac2bd31b5d2322b117aef0e0e1289 (patch) | |
tree | a4bf954aa81521d600d2cf712d03d3fa320c7ae8 | |
parent | 5c27fdd77ab7c64612ebbbc6e60d09b9a376d653 (diff) | |
download | ATCD-ddb4b50cde6ac2bd31b5d2322b117aef0e0e1289.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/examples/Callback_Quoter/Consumer_Handler.h | 3 | ||||
-rw-r--r-- | TAO/examples/Callback_Quoter/Consumer_Input_Handler.h | 2 | ||||
-rw-r--r-- | TAO/examples/Callback_Quoter/Consumer_i.cpp | 3 | ||||
-rw-r--r-- | TAO/examples/Callback_Quoter/Notifier_i.cpp | 69 | ||||
-rw-r--r-- | TAO/examples/Callback_Quoter/Notifier_i.h | 4 |
5 files changed, 41 insertions, 40 deletions
diff --git a/TAO/examples/Callback_Quoter/Consumer_Handler.h b/TAO/examples/Callback_Quoter/Consumer_Handler.h index f80ad543431..e6ffb32c1a9 100644 --- a/TAO/examples/Callback_Quoter/Consumer_Handler.h +++ b/TAO/examples/Callback_Quoter/Consumer_Handler.h @@ -80,7 +80,8 @@ public: Callback_Quoter::Consumer_var consumer_var_; // Pointer to the consumer object registered with the ORB. - ACE_Reactor *reactor_used (void) const; + + ACE_Reactor* reactor_used (void) const; // This method gives the reactor pointer. int registered_; diff --git a/TAO/examples/Callback_Quoter/Consumer_Input_Handler.h b/TAO/examples/Callback_Quoter/Consumer_Input_Handler.h index fb00aed0498..6d8e350a554 100644 --- a/TAO/examples/Callback_Quoter/Consumer_Input_Handler.h +++ b/TAO/examples/Callback_Quoter/Consumer_Input_Handler.h @@ -69,7 +69,7 @@ private: ~Consumer_Input_Handler () { - + // No-op } Consumer_Handler *consumer_handler_; diff --git a/TAO/examples/Callback_Quoter/Consumer_i.cpp b/TAO/examples/Callback_Quoter/Consumer_i.cpp index f1824eaa0e5..e11ad6eaad2 100644 --- a/TAO/examples/Callback_Quoter/Consumer_i.cpp +++ b/TAO/examples/Callback_Quoter/Consumer_i.cpp @@ -44,8 +44,9 @@ Consumer_i::push (const Callback_Quoter::Info &data, } void -Consumer_i::shutdown (CORBA::Environment &) +Consumer_i::shutdown ( CORBA::Environment &) { + // Instruct the ORB to shutdown. ACE_DEBUG ((LM_DEBUG, diff --git a/TAO/examples/Callback_Quoter/Notifier_i.cpp b/TAO/examples/Callback_Quoter/Notifier_i.cpp index e45e0900044..0cd6e0940f0 100644 --- a/TAO/examples/Callback_Quoter/Notifier_i.cpp +++ b/TAO/examples/Callback_Quoter/Notifier_i.cpp @@ -201,48 +201,47 @@ Notifier_i::market_status (const char *stock_name, } void -Notifier_i::shutdown (CORBA::Environment &) +Notifier_i::shutdown (CORBA::Environment &env) { - /* if (this->consumer_map_.current_size () > 0) - {*/ - if ( this->consumer_map_.close () == -1) - ACE_ERROR ((LM_ERROR, - "Consumer_map_close error!\n")); - - // } - - /* for (CONSUMER_MAP::ITERATOR iter = this->consumer_map_.begin (); - iter!= this->consumer_map_.end (); - iter ++) - { - (*iter).int_id_->reset (); - size_t no= this->consumer_map_.unbind ((*iter).ext_id_, - (*iter).int_id_); - + ACE_DEBUG ((LM_DEBUG, + "The Callback Quoter server is shutting down...")); - if (no == -1) - { + /* CONSUMERS *consumers; + for (CONSUMER_MAP::ITERATOR iter = this->consumer_map_.begin (); + iter!= this->consumer_map_.end (); + iter ++) + { + consumers = (*iter).int_id_; + + for (CONSUMERS::ITERATOR inner_iter= consumers->begin (); + inner_iter != consumers->end(); + inner_iter ++ ) + { + ACE_DEBUG ((LM_DEBUG, + " Removing consumer: Stockname %s Threshold %d\n", + (*iter).ext_id_, + (*inner_iter).desired_value_)); + + if ( consumers->remove(*inner_iter) == -1) ACE_ERROR ((LM_ERROR, - "error! ACE_Hash_Map_Manager: unbind ()\n" ); + "shutdown: remove failed!/n"));; - } - - - - this->consumer_map_.close (); - - } - } - - this->consumer_map_.close (); + } + if ( this->consumer_map_.unbind ((*iter).ext_id_, + (*iter).int_id_) == -1) + ACE_ERROR ((LM_ERROR, + "shutdown: unbind failed!/n")); + } - }*/ + ACE_DEBUG ((LM_DEBUG, + " All consumers removed!\n"));*/ - ACE_DEBUG ((LM_DEBUG, - "The Callback Quoter server is shutting down")); + if ( this->consumer_map_.close () == -1) + ACE_ERROR ((LM_ERROR, + "Consumer_map_close error!\n")); - // Instruct the ORB to shutdown. - this->orb_->shutdown (); + // Instruct the ORB to shutdown. + this->orb_->shutdown (); } diff --git a/TAO/examples/Callback_Quoter/Notifier_i.h b/TAO/examples/Callback_Quoter/Notifier_i.h index 72b772421f3..65041100450 100644 --- a/TAO/examples/Callback_Quoter/Notifier_i.h +++ b/TAO/examples/Callback_Quoter/Notifier_i.h @@ -63,7 +63,7 @@ public: void orb (CORBA::ORB_ptr orb); // Get the orb pointer. - virtual void shutdown (CORBA::Environment &); + virtual void shutdown (CORBA::Environment &env); // Shutdown the Notifier. // CONSUMER_MAP* get_consumer_map_ptr (); @@ -83,7 +83,7 @@ public: // Comparison operator. Callback_Quoter::Consumer_var consumer_; - // Stores the client reference. + // Stores the consumer object reference. CORBA::Long desired_value_; // Stores the stock threshold value. |