diff options
author | sma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2012-12-05 09:43:05 +0000 |
---|---|---|
committer | sma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2012-12-05 09:43:05 +0000 |
commit | acf0c963ef36b0ba87548e01197505310f340f7c (patch) | |
tree | 9593d07a6ebe901a00426cf079a7c9ebac3805b7 /TAO/tao/GIOP_Message_Base.cpp | |
parent | eba5b962b002b31ae26f2dabff3822a7f3af4353 (diff) | |
download | ATCD-acf0c963ef36b0ba87548e01197505310f340f7c.tar.gz |
Wed Dec 05 09:41:00 UTC 2012 Simon Massey <simon dot massey at prismtech dot com>
orbsvcs/orbsvcs/PortableGroup/UIPMC_Mcast_Transport.cpp: Re-fixed the memory leak in MIOP listener
tao/GIOP_Message_Base.cpp & tao/ZIOP/ZIOP.cpp: Corrected mix-up between Message block self_flags() and data block flags()
Diffstat (limited to 'TAO/tao/GIOP_Message_Base.cpp')
-rw-r--r-- | TAO/tao/GIOP_Message_Base.cpp | 50 |
1 files changed, 17 insertions, 33 deletions
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index 4e2f872df50..8d5885f5400 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -658,21 +658,16 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, // we pass it on to the higher layers of the ORB. So we dont to any // copies at all here. The same is also done in the higher layers. - ACE_Data_Block *db = 0; + ACE_Data_Block *db = qd->msg_block ()->data_block (); - // Get the flag in the message block - ACE_Message_Block::Message_Flags flg = qd->msg_block ()->self_flags (); + // Get the flag in the message's data block + ACE_Message_Block::Message_Flags flg = db->flags (); - if (ACE_BIT_ENABLED (flg, ACE_Message_Block::DONT_DELETE)) - { - // Use the same datablock - db = qd->msg_block ()->data_block (); - } - else + if (ACE_BIT_DISABLED (flg, ACE_Message_Block::DONT_DELETE)) { // Use a duplicated datablock as the datablock has come off the // heap. - db = qd->msg_block ()->data_block ()->duplicate (); + db = db->duplicate (); } db->size (qd->msg_block ()->length ()); @@ -695,7 +690,7 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, } TAO_InputCDR input_cdr (db, - db->flags (), + flg, rd_pos, wr_pos, qd->byte_order (), @@ -773,21 +768,16 @@ TAO_GIOP_Message_Base::process_reply_message ( size_t wr_pos = qd->msg_block ()->wr_ptr () - qd->msg_block ()->base (); rd_pos += TAO_GIOP_MESSAGE_HEADER_LEN; - ACE_Data_Block *db = 0; + ACE_Data_Block *db = qd->msg_block ()->data_block (); - // Get the flag in the message block - ACE_Message_Block::Message_Flags flg = qd->msg_block ()->self_flags (); + // Get the flag in the message's data block + ACE_Message_Block::Message_Flags flg = db->flags (); - if (ACE_BIT_ENABLED (flg, ACE_Message_Block::DONT_DELETE)) - { - // Use the same datablock - db = qd->msg_block ()->data_block (); - } - else + if (ACE_BIT_DISABLED (flg, ACE_Message_Block::DONT_DELETE)) { // Use a duplicated datablock as the datablock has come off the // heap. - db = qd->msg_block ()->data_block ()->duplicate (); + db = db->duplicate (); } db->size (qd->msg_block ()->length ()); @@ -813,7 +803,7 @@ TAO_GIOP_Message_Base::process_reply_message ( // we pass it on to the higher layers of the ORB. So we dont to any // copies at all here. TAO_InputCDR input_cdr (db, - db->flags (), + flg, rd_pos, wr_pos, qd->byte_order (), @@ -1707,22 +1697,16 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd, // we pass it on to the higher layers of the ORB. So we dont to any // copies at all here. The same is also done in the higher layers. - ACE_Message_Block::Message_Flags flg = 0; - ACE_Data_Block *db = 0; + ACE_Data_Block *db = qd->msg_block ()->data_block (); - // Get the flag in the message block - flg = qd->msg_block ()->self_flags (); + // Get the flag in the message's data block + ACE_Message_Block::Message_Flags flg = db->flags (); - if (ACE_BIT_ENABLED (flg, ACE_Message_Block::DONT_DELETE)) - { - // Use the same datablock - db = qd->msg_block ()->data_block (); - } - else + if (ACE_BIT_DISABLED (flg, ACE_Message_Block::DONT_DELETE)) { // Use a duplicated datablock as the datablock has come off the // heap. - db = qd->msg_block ()->data_block ()->duplicate (); + db = db->duplicate (); } TAO_InputCDR input_cdr (db, |