From b2b5494dba4e6beabfdf4d4ef83cd5fc6ae47679 Mon Sep 17 00:00:00 2001 From: bala Date: Thu, 3 May 2001 01:29:44 +0000 Subject: ChangeLogTag: Wed May 2 20:26:56 2001 Balachandran Natarajan --- TAO/ChangeLogs/ChangeLog-02a | 6 ++++++ TAO/tao/GIOP_Message_Base.cpp | 12 +++++++++++- TAO/tao/GIOP_Message_Generator_Parser_10.cpp | 6 ++++-- TAO/tao/GIOP_Message_Generator_Parser_12.cpp | 6 ++++-- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 667796e38f8..7496ee89c41 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,9 @@ +Wed May 2 20:26:56 2001 Balachandran Natarajan + + * tao/GIOP_Message_Generator_Parser_12.cpp: + * tao/GIOP_Message_Generator_Parser_10.cpp: + * tao/GIOP_Message_Base.cpp: Added some comments. + Wed May 2 16:52:09 2001 Balachandran Natarajan * tao/ORB_Core.cpp: diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index 3024636232b..d4a5dfcbf67 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -310,7 +310,7 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, // Create a input CDR stream. // NOTE: We use the same data block in which we read the message and // we pass it on to the higher layers of the ORB. So we dont to any - // copies at all here. The same is alos done in the higher layers. + // copies at all here. The same is also done in the higher layers. TAO_InputCDR input_cdr (this->message_handler_.steal_data_block (), rd_pos, wr_pos, @@ -322,6 +322,11 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, // We know we have some request message. Check whether it is a // GIOP_REQUEST or GIOP_LOCATE_REQUEST to take action. + + // Once we send the InputCDR stream we need to just forget about + // the stream and never touch that again for anything. We basically + // loose ownership of the data_block. + switch (this->message_handler_.message_state ().message_type) { case TAO_GIOP_REQUEST: @@ -367,6 +372,11 @@ TAO_GIOP_Message_Base::process_reply_message ( // We know we have some reply message. Check whether it is a // GIOP_REPLY or GIOP_LOCATE_REPLY to take action. + + // Once we send the InputCDR stream we need to just forget about + // the stream and never touch that again for anything. We basically + // loose ownership of the data_block. + switch (this->message_handler_.message_state ().message_type) { case TAO_GIOP_REPLY: diff --git a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp index 3ebb8d76640..174f4beffba 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp @@ -428,7 +428,8 @@ TAO_GIOP_Message_Generator_Parser_10::parse_reply ( params) == -1) return -1; - // Steal rest of the contents in to the reply params + // Steal rest of the contents in to the reply params and loose + // ownership of the data block. params.input_cdr_.steal_data (cdr); return 0; @@ -446,7 +447,8 @@ TAO_GIOP_Message_Generator_Parser_10::parse_locate_reply ( return -1; - // Steal the contents in to the reply CDR + // Steal the contents in to the reply CDR and loose ownership of the + // data block. params.input_cdr_.steal_data (cdr); return 0; diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp index a6f0f248a7e..28943d686c2 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp @@ -449,7 +449,8 @@ TAO_GIOP_Message_Generator_Parser_12::parse_reply ( - // Steal the contents in to the reply CDR + // Steal the contents in to the reply CDR and loose ownership of the + // data block. params.input_cdr_.steal_data (cdr); return 0; @@ -472,7 +473,8 @@ TAO_GIOP_Message_Generator_Parser_12::parse_locate_reply ( cdr.align_read_ptr (TAO_GIOP_MESSAGE_ALIGN_PTR); } - // Steal the contents in to the reply CDR + // Steal the contents in to the reply CDR and loose ownership of the + // data block. params.input_cdr_.steal_data (cdr); return 0; -- cgit v1.2.1