From 018ea835a3501530860e047ae341535802803974 Mon Sep 17 00:00:00 2001 From: bala Date: Fri, 9 May 2003 21:46:41 +0000 Subject: ChangeLogTag:Fri May 9 16:43:51 2003 Balachandran Natarajan --- TAO/ChangeLog | 10 ++++++++++ TAO/tao/Invocation.cpp | 24 ++++++++++++++++++++++++ TAO/tao/Invocation.i | 7 ------- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 148fc898dd2..a9914ade933 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,13 @@ +Fri May 9 16:43:51 2003 Balachandran Natarajan + + * tao/Invocation.i: Removed TAO_GIOP_Invocation::profile () from + the inlined file to the cpp file. + + * tao/Invocation.cpp: In TAO_GIOP_Invocation::profile () increment + the refcount of the profile that is being stored in the + class. Decerement the refcount of the profile, if one exists + in the destructor. + Fri May 9 16:21:48 2003 Balachandran Natarajan * tao/SArgument.h: diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp index 54bd5f0b0da..b67d2abaf13 100644 --- a/TAO/tao/Invocation.cpp +++ b/TAO/tao/Invocation.cpp @@ -144,6 +144,9 @@ TAO_GIOP_Invocation::TAO_GIOP_Invocation (TAO_Stub *stub, TAO_GIOP_Invocation::~TAO_GIOP_Invocation (void) { + /// Ossama remove this when you are done.. + if (this->profile_) + this->profile_->_decr_refcnt (); TAO_Transport::release (this->transport_); } @@ -588,6 +591,27 @@ TAO_GIOP_Invocation::location_forward_i (TAO_Stub *stubobj this->restart_flag_ = 1; } +void +TAO_GIOP_Invocation::profile (TAO_Profile *p) +{ + // @@ NOTE:This is just a workaround for a more serious problem with + // profile management. This would cover some potential issues that + // Ossama is working on. + // Ossama, please remove them when you are done. + TAO_Profile *tmp = this->profile_; + + // Dont do anything if the incoming profile is null + if (p) + { + (void) p->_incr_refcnt (); + this->profile_ = p; + (void) this->profile_->_incr_refcnt (); + + if (tmp) + (void) tmp->_decr_refcnt (); + } +} + // **************************************************************** TAO_GIOP_Synch_Invocation::TAO_GIOP_Synch_Invocation (void) diff --git a/TAO/tao/Invocation.i b/TAO/tao/Invocation.i index 487ba949d35..1197d2ab6c7 100644 --- a/TAO/tao/Invocation.i +++ b/TAO/tao/Invocation.i @@ -96,13 +96,6 @@ TAO_GIOP_Invocation::profile (void) return this->profile_; } - -ACE_INLINE void -TAO_GIOP_Invocation::profile (TAO_Profile *p) -{ - this->profile_ = p; -} - ACE_INLINE TAO_ORB_Core * TAO_GIOP_Invocation::orb_core (void) { -- cgit v1.2.1