diff options
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 18 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.cpp | 12 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/Connection_Cache_Manager.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/Connection_Handler.cpp | 23 | ||||
-rw-r--r-- | TAO/tao/Connection_Handler.inl | 8 | ||||
-rw-r--r-- | TAO/tao/IIOP_Connect.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/IIOP_Transport.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Connect.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Transport.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/Strategies/UIOP_Connect.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/Strategies/UIOP_Transport.cpp | 6 |
12 files changed, 101 insertions, 31 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 80d83e3c792..5c8c75b9ef0 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,21 @@ +Sat Nov 25 21:09:54 2000 Balachandran Natarajan <bala@cs.wustl.edu> + + * tao/Connection_Cache_Manager.cpp: + * tao/Connection_Handler.cpp: + * tao/Connection_Handler.inl: + * tao/IIOP_Transport.cpp: + * tao/IIOP_Connect.cpp: + * tao/Strategies/UIOP_Transport.cpp: + * tao/Strategies/UIOP_Connect.cpp: + * tao/Strategies/SHMIOP_Connect.cpp: + * tao/Strategies/SHMIOP_Transport.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.cpp: Fixed an FMR + problem. The problem was the wrong order in which we were + destroying the handlers and purging the handler from the cache + map. We need to purgethe handler first and then destroy the + handlers. + Sat Nov 25 20:59:07 2000 Pradeep Gore <pradeep@cs.wustl.edu> * orbsvcs/tests/Notify/lib/Notify_Test_Client.{h, cpp}: diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.cpp index 7f1eb363e92..6a0df1d8484 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connect.cpp @@ -624,8 +624,16 @@ TAO_SSLIOP_Client_Connection_Handler::handle_cleanup (void) this->reactor ()->cancel_timer (this); } - // Now do the decerment of the ref count - this->decr_ref_count (); + if (this->is_registered ()) + { + // Set the flag to indicate that it is no longer registered with + // the reactor, so that it isn't included in the set that is + // passed to the reactor on ORB destruction. + this->is_registered (0); + + // Now do the decrement of the ref count + this->decr_ref_count (); + } return 0; } diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp index b86abfe5e37..64f8433a76a 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp @@ -502,8 +502,9 @@ TAO_SSLIOP_Client_Transport::send_request_header ( void TAO_SSLIOP_Client_Transport::close_connection (void) { - this->handler_->purge_entry (); this->service_handler ()->handle_close (); + + this->handler_->purge_entry (); } // ********************************************************************* @@ -536,6 +537,6 @@ TAO_SSLIOP_Server_Transport::service_handler (void) void TAO_SSLIOP_Server_Transport::close_connection (void) { - this->handler_->purge_entry (); this->service_handler ()->handle_close (); + this->handler_->purge_entry (); } diff --git a/TAO/tao/Connection_Cache_Manager.cpp b/TAO/tao/Connection_Cache_Manager.cpp index def7d90ae58..fddc6140112 100644 --- a/TAO/tao/Connection_Cache_Manager.cpp +++ b/TAO/tao/Connection_Cache_Manager.cpp @@ -277,7 +277,12 @@ int TAO_Connection_Cache_Manager::purge_entry_i (HASH_MAP_ENTRY *&entry) { // Remove the enrty from the Map - return this->cache_map_.unbind (entry); + int retval = this->cache_map_.unbind (entry); + + // Set the entry pointer to zero + entry = 0; + + return retval; } diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp index bb6ac1521b2..ccb5ca6a272 100644 --- a/TAO/tao/Connection_Handler.cpp +++ b/TAO/tao/Connection_Handler.cpp @@ -20,14 +20,29 @@ TAO_Connection_Handler::TAO_Connection_Handler (TAO_ORB_Core *orb_core) is_registered_ (0) { } + + +TAO_Connection_Handler::~TAO_Connection_Handler (void) +{ + // Set some of the pointers that we hold to zero explicitly, so that + // nobody tries to access these + this->orb_core_ = 0; + this->tss_resources_ = 0; + this->cache_map_entry_ = 0; +} + + int TAO_Connection_Handler::purge_entry (void) { - // Decerment our reference count before we remove ourselves from the - // map as our references are not held by the map - this->decr_ref_count (); - return + int retval = this->orb_core_->connection_cache ().purge_entry (this->cache_map_entry_); + + // Decrement our reference count as we have been removed from the + // cache map. + this->decr_ref_count (); + + return retval; } int diff --git a/TAO/tao/Connection_Handler.inl b/TAO/tao/Connection_Handler.inl index dcbafce3da6..e79d07a513c 100644 --- a/TAO/tao/Connection_Handler.inl +++ b/TAO/tao/Connection_Handler.inl @@ -11,12 +11,6 @@ TAO_Connection_Handler::TAO_Connection_Handler (void) { } -ACE_INLINE -TAO_Connection_Handler::~TAO_Connection_Handler (void) -{ -} - - ACE_INLINE TAO_Connection_Cache_Manager::HASH_MAP_ENTRY * TAO_Connection_Handler::cache_map_entry (void) { @@ -47,7 +41,7 @@ TAO_Connection_Handler::decr_ref_count (void) // vanishes, the entry that we have is invalid. So, do this // check before we access the internals of the // <cache_map_entry_> - if (cache_map_entry_) + if (this->cache_map_entry_) { // Now mark the Ext_Id for us as closed diff --git a/TAO/tao/IIOP_Connect.cpp b/TAO/tao/IIOP_Connect.cpp index 0b3b47a5901..a6d7fc9527f 100644 --- a/TAO/tao/IIOP_Connect.cpp +++ b/TAO/tao/IIOP_Connect.cpp @@ -530,8 +530,16 @@ TAO_IIOP_Client_Connection_Handler::handle_cleanup (void) this->reactor ()->cancel_timer (this); } - // Now do the decrement of the ref count - this->decr_ref_count (); + if (this->is_registered ()) + { + // Set the flag to indicate that it is no longer registered with + // the reactor, so that it isn't included in the set that is + // passed to the reactor on ORB destruction. + this->is_registered (0); + + // Now do the decrement of the ref count + this->decr_ref_count (); + } return 0; } diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index 786abdc88b0..81f925bf754 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -111,12 +111,14 @@ TAO_IIOP_Server_Transport::service_handler (void) void TAO_IIOP_Server_Transport::close_connection (void) { + // Now close the handler + this->handler_->handle_close (); + // Purge the entry from the Cache map first and then close the // handler this->handler_->purge_entry (); - // Now close the handler - this->handler_->handle_close (); + } @@ -411,12 +413,12 @@ TAO_IIOP_Client_Transport::send_request_header (TAO_Operation_Details &opdetails void TAO_IIOP_Client_Transport::close_connection (void) { + // Now close the handler + this->handler_->handle_close (); + // Purge the entry from the Cache map first and then close the // handler this->handler_->purge_entry (); - - // Now close the handler - this->handler_->handle_close (); } // ********************************************************************* diff --git a/TAO/tao/Strategies/SHMIOP_Connect.cpp b/TAO/tao/Strategies/SHMIOP_Connect.cpp index eb9c003afe3..56f8ed072a5 100644 --- a/TAO/tao/Strategies/SHMIOP_Connect.cpp +++ b/TAO/tao/Strategies/SHMIOP_Connect.cpp @@ -484,8 +484,16 @@ TAO_SHMIOP_Client_Connection_Handler::handle_cleanup (void) this->reactor ()->cancel_timer (this); } - // Now do the decrement of the ref count - this->decr_ref_count (); + if (this->is_registered ()) + { + // Set the flag to indicate that it is no longer registered with + // the reactor, so that it isn't included in the set that is + // passed to the reactor on ORB destruction. + this->is_registered (0); + + // Now do the decrement of the ref count + this->decr_ref_count (); + } return 0; } diff --git a/TAO/tao/Strategies/SHMIOP_Transport.cpp b/TAO/tao/Strategies/SHMIOP_Transport.cpp index 8bde95a7f30..e4e330947d4 100644 --- a/TAO/tao/Strategies/SHMIOP_Transport.cpp +++ b/TAO/tao/Strategies/SHMIOP_Transport.cpp @@ -113,8 +113,8 @@ TAO_SHMIOP_Server_Transport::service_handler (void) void TAO_SHMIOP_Server_Transport::close_connection (void) { - this->handler_->purge_entry (); this->service_handler ()->handle_close (); + this->handler_->purge_entry (); } // **************************************************************** @@ -394,8 +394,9 @@ TAO_SHMIOP_Client_Transport::service_handler (void) void TAO_SHMIOP_Client_Transport::close_connection (void) { - this->handler_->purge_entry (); this->service_handler ()->handle_close (); + + this->handler_->purge_entry (); } // ********************************************************************* diff --git a/TAO/tao/Strategies/UIOP_Connect.cpp b/TAO/tao/Strategies/UIOP_Connect.cpp index f5dc51c7e0b..0ffea424877 100644 --- a/TAO/tao/Strategies/UIOP_Connect.cpp +++ b/TAO/tao/Strategies/UIOP_Connect.cpp @@ -485,8 +485,16 @@ TAO_UIOP_Client_Connection_Handler::handle_cleanup (void) this->reactor ()->cancel_timer (this); } - // Now do the decerment of the ref count - this->decr_ref_count (); + if (this->is_registered ()) + { + // Set the flag to indicate that it is no longer registered with + // the reactor, so that it isn't included in the set that is + // passed to the reactor on ORB destruction. + this->is_registered (0); + + // Now do the decrement of the ref count + this->decr_ref_count (); + } return 0; } diff --git a/TAO/tao/Strategies/UIOP_Transport.cpp b/TAO/tao/Strategies/UIOP_Transport.cpp index fc22a84665f..5ab49b6f548 100644 --- a/TAO/tao/Strategies/UIOP_Transport.cpp +++ b/TAO/tao/Strategies/UIOP_Transport.cpp @@ -112,9 +112,10 @@ TAO_UIOP_Server_Transport::service_handler (void) void TAO_UIOP_Server_Transport::close_connection (void) { + this->handler_->handle_close (); + // Purge the handler entry from the Connection Cache this->handler_->purge_entry (); - this->handler_->handle_close (); } // **************************************************************** @@ -391,9 +392,10 @@ TAO_UIOP_Client_Transport::send_request_header (TAO_Operation_Details &opdetails void TAO_UIOP_Client_Transport::close_connection (void) { + this->handler_->handle_close (); + // Purge the handler entry from the Connection Cache this->handler_->purge_entry (); - this->handler_->handle_close (); } // **************************************************************** |