From 7ffa18a6417a589b7eb1cdcc8d972918344c8c4e Mon Sep 17 00:00:00 2001 From: bala Date: Sun, 14 Apr 2002 15:22:08 +0000 Subject: ChangeLogTag:Sun Apr 14 10:35:49 2002 Balachandran Natarajan --- TAO/ChangeLogs/ChangeLog-02a | 5 ++++ .../PortableGroup/UIPMC_Connection_Handler.cpp | 28 ++++++++++++++-------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 40f75aec11c..deba7e0baa4 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,8 @@ +Sun Apr 14 10:35:49 2002 Balachandran Natarajan + + * orbsvcs/orbsvcs/PortableGroup/UIPMC_Connection_Handler.cpp: Yet + another protocol needing the same fix. + Sun Apr 14 10:31:24 2002 Balachandran Natarajan * tao/Strategies/UIOP_Connection_Handler.cpp: diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connection_Handler.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connection_Handler.cpp index d7048358d88..63e1580e7b6 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connection_Handler.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connection_Handler.cpp @@ -236,7 +236,18 @@ TAO_UIPMC_Connection_Handler::handle_close (ACE_HANDLE handle, long upcalls = this->decr_pending_upcalls (); - ACE_ASSERT (upcalls >= 0); + if (upcalls < 0) + return 0; + + if (this->get_handle () != ACE_INVALID_HANDLE) + { + // Just close the socket irrespective of what the upcall count + // is. + this->peer().close (); + + // Set the handle to be INVALID_HANDLE + this->set_handle (ACE_INVALID_HANDLE); + } // Try to clean up things if the upcall count has reached 0 if (upcalls == 0) @@ -273,16 +284,13 @@ TAO_UIPMC_Connection_Handler::handle_close_i (void) } // Close the handle.. - if (this->get_handle () != ACE_INVALID_HANDLE) - { - // Remove the entry as it is invalid - this->transport ()->purge_entry (); + // Remove the entry as it is invalid + this->transport ()->purge_entry (); - // Signal the transport that we will no longer have - // a reference to it. This will eventually call - // TAO_Transport::release (). - this->transport (0); - } + // Signal the transport that we will no longer have + // a reference to it. This will eventually call + // TAO_Transport::release (). + this->transport (0); // Follow usual Reactor-style lifecycle semantics and commit // suicide. -- cgit v1.2.1