diff options
author | bala <balanatarajan@users.noreply.github.com> | 2003-05-09 21:46:41 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2003-05-09 21:46:41 +0000 |
commit | 018ea835a3501530860e047ae341535802803974 (patch) | |
tree | 6bc3a74bab12631ec329a489d784965bde447133 | |
parent | ad9b90a423d0831f9bb7c75bd113cfe78ae9b353 (diff) | |
download | ATCD-018ea835a3501530860e047ae341535802803974.tar.gz |
ChangeLogTag:Fri May 9 16:43:51 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 10 | ||||
-rw-r--r-- | TAO/tao/Invocation.cpp | 24 | ||||
-rw-r--r-- | 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 <bala@dre.vanderbilt.edu> + + * 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 <bala@dre.vanderbilt.edu> * 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) { |