diff options
author | bala <balanatarajan@users.noreply.github.com> | 2001-11-08 19:59:41 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2001-11-08 19:59:41 +0000 |
commit | 470bc9900addb78afb22e2be962d9ad05a453c48 (patch) | |
tree | 64b66260513774a39dfbcdaedc813bfd6d3431e0 /TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp | |
parent | ba57d1be1b051f93392ab6f9232765dda29db9ed (diff) | |
download | ATCD-470bc9900addb78afb22e2be962d9ad05a453c48.tar.gz |
ChangeLogTag: Thu Nov 8 13:57:58 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp')
-rw-r--r-- | TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp index 2ca74135dfe..ebad9ea91b5 100644 --- a/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp +++ b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp @@ -55,7 +55,17 @@ TAO_DII_Deferred_Reply_Dispatcher::dispatch_reply ( this->reply_status_ = params.reply_status_; // Transfer the <params.input_cdr_>'s content to this->reply_cdr_ - (void) this->reply_cdr_.clone_from (params.input_cdr_); + ACE_Data_Block *db = + this->reply_cdr_.clone_from (params.input_cdr_); + + // See whether we need to delete the data block by checking the + // flags. We cannot be happy that we initally allocated the + // datablocks of the stack. If this method is called twice, as is in + // some cases where the same invocation object is used to make two + // invocations like forwarding, the release becomes essential. + if (ACE_BIT_DISABLED (db->flags (), + ACE_Message_Block::DONT_DELETE)) + db->release (); // Steal the buffer, that way we don't do any unnecesary copies of // this data. |