From fd928569c1d86c4bf2f2e2b6391aa8da78462622 Mon Sep 17 00:00:00 2001 From: bala Date: Tue, 12 Nov 2002 17:20:46 +0000 Subject: ChangeLogTag: Tue Nov 12 11:15:50 2002 Balachandran Natarajan --- TAO/ChangeLog | 10 ++++++++++ TAO/tao/IIOP_Connector.cpp | 4 +++- TAO/tao/Strategies/SHMIOP_Connector.cpp | 4 +++- TAO/tao/Strategies/UIOP_Connector.cpp | 4 +++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index c9022ed8bb7..1cb396f29d7 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,13 @@ +Tue Nov 12 11:15:50 2002 Balachandran Natarajan + + * tao/IIOP_Connector.cpp: + * tao/Strategies/UIOP_Connector.cpp: + * tao/Strategies/SHMIOP_Connector.cpp: + * orbsvcs/orbsvcs/SSLIOP/IIOP_SSL_Connector.cpp: + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp: Added an assert + statement after decrementing the reference count. Point taken + from "Pragmatic Programmer". + Tue Nov 12 11:08:32 2002 Balachandran Natarajan * tao/Connection_Handler.h: Commented out the following calls diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp index 1d16fd547d8..fdb1a8e32d5 100644 --- a/TAO/tao/IIOP_Connector.cpp +++ b/TAO/tao/IIOP_Connector.cpp @@ -194,8 +194,10 @@ TAO_IIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, // the refcount whether the connection is successful ot not. // REFCNT: Matches with TAO_Connect_Strategy<>::make_svc_handler() - svc_handler->decr_refcount (); + long refcount = svc_handler->decr_refcount (); + ACE_ASSERT (refcount >= 0); + if (result == -1) { // Give users a clue to the problem. diff --git a/TAO/tao/Strategies/SHMIOP_Connector.cpp b/TAO/tao/Strategies/SHMIOP_Connector.cpp index b7dbdb85a09..2f30ae2e693 100644 --- a/TAO/tao/Strategies/SHMIOP_Connector.cpp +++ b/TAO/tao/Strategies/SHMIOP_Connector.cpp @@ -199,7 +199,9 @@ TAO_SHMIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, // increment to the handler is done in make_svc_handler (). Now // that we dont need the reference to it anymore we can decrement // the refcount whether the connection is successful ot not. - svc_handler->decr_refcount (); + long refcount = svc_handler->decr_refcount (); + + ACE_ASSERT (refcount >= 0); // = We dont do a wait since we know that we are doing a blocking // connect diff --git a/TAO/tao/Strategies/UIOP_Connector.cpp b/TAO/tao/Strategies/UIOP_Connector.cpp index c53c225a0c6..540f8941d08 100644 --- a/TAO/tao/Strategies/UIOP_Connector.cpp +++ b/TAO/tao/Strategies/UIOP_Connector.cpp @@ -191,7 +191,9 @@ TAO_UIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation, // increment to the handler is done in make_svc_handler (). Now // that we dont need the reference to it anymore we can decrement // the refcount whether the connection is successful ot not. - svc_handler->decr_refcount (); + long refcount = svc_handler->decr_refcount (); + + ACE_ASSERT (refcount >= 0); if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, -- cgit v1.2.1