summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
authorsma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-01-16 08:46:36 +0000
committersma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-01-16 08:46:36 +0000
commitecbbfc520c2d12b5027b8fd16691b85f975408c0 (patch)
tree36df8ad45810b0c04e42564f6b04b784bd42d3be /TAO/tao
parent01cb349005b2ca22ac7d77bc02e49a6744757ae8 (diff)
downloadATCD-ecbbfc520c2d12b5027b8fd16691b85f975408c0.tar.gz
Wed Jan 16 08:45:30 UTC 2013 Simon Massey <simon dot massey at prismtech dot com>
tao/GIOP_Message_Base.cpp, tao/ZIOP/ZIOP.cpp: Correct flags used.
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/GIOP_Message_Base.cpp46
-rw-r--r--TAO/tao/ZIOP/ZIOP.cpp2
2 files changed, 32 insertions, 16 deletions
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp
index 8d5885f5400..f4ddd3473d5 100644
--- a/TAO/tao/GIOP_Message_Base.cpp
+++ b/TAO/tao/GIOP_Message_Base.cpp
@@ -658,16 +658,21 @@ 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 = qd->msg_block ()->data_block ();
+ ACE_Data_Block *db = 0;
- // Get the flag in the message's data block
- ACE_Message_Block::Message_Flags flg = db->flags ();
+ // Get the flag in the message block
+ ACE_Message_Block::Message_Flags flg = qd->msg_block ()->self_flags ();
- if (ACE_BIT_DISABLED (flg, ACE_Message_Block::DONT_DELETE))
+ if (ACE_BIT_ENABLED (flg, ACE_Message_Block::DONT_DELETE))
+ {
+ // Use the same datablock
+ db = qd->msg_block ()->data_block ();
+ }
+ else
{
// Use a duplicated datablock as the datablock has come off the
// heap.
- db = db->duplicate ();
+ db = qd->msg_block ()->data_block ()->duplicate ();
}
db->size (qd->msg_block ()->length ());
@@ -768,16 +773,21 @@ 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 = qd->msg_block ()->data_block ();
+ ACE_Data_Block *db = 0;
- // Get the flag in the message's data block
- ACE_Message_Block::Message_Flags flg = db->flags ();
+ // Get the flag in the message block
+ ACE_Message_Block::Message_Flags flg = qd->msg_block ()->self_flags ();
- if (ACE_BIT_DISABLED (flg, ACE_Message_Block::DONT_DELETE))
+ if (ACE_BIT_ENABLED (flg, ACE_Message_Block::DONT_DELETE))
+ {
+ // Use the same datablock
+ db = qd->msg_block ()->data_block ();
+ }
+ else
{
// Use a duplicated datablock as the datablock has come off the
// heap.
- db = db->duplicate ();
+ db = qd->msg_block ()->data_block ()->duplicate ();
}
db->size (qd->msg_block ()->length ());
@@ -1697,16 +1707,22 @@ 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_Data_Block *db = qd->msg_block ()->data_block ();
+ ACE_Message_Block::Message_Flags flg = 0;
+ ACE_Data_Block *db = 0;
- // Get the flag in the message's data block
- ACE_Message_Block::Message_Flags flg = db->flags ();
+ // Get the flag in the message block
+ flg = qd->msg_block ()->self_flags ();
- if (ACE_BIT_DISABLED (flg, ACE_Message_Block::DONT_DELETE))
+ if (ACE_BIT_ENABLED (flg, ACE_Message_Block::DONT_DELETE))
+ {
+ // Use the same datablock
+ db = qd->msg_block ()->data_block ();
+ }
+ else
{
// Use a duplicated datablock as the datablock has come off the
// heap.
- db = db->duplicate ();
+ db = qd->msg_block ()->data_block ()->duplicate ();
}
TAO_InputCDR input_cdr (db,
diff --git a/TAO/tao/ZIOP/ZIOP.cpp b/TAO/tao/ZIOP/ZIOP.cpp
index cbfa5b9749b..10639d797e8 100644
--- a/TAO/tao/ZIOP/ZIOP.cpp
+++ b/TAO/tao/ZIOP/ZIOP.cpp
@@ -196,7 +196,7 @@ TAO_ZIOP_Loader::decompress (ACE_Data_Block **db, TAO_Queued_Data& qd,
size_t const wr = qd.msg_block ()->wr_ptr () - qd.msg_block ()->base ();
TAO_InputCDR cdr ((*db),
- (*db)->flags (),
+ qd.msg_block ()->self_flags (),
begin + TAO_GIOP_MESSAGE_HEADER_LEN,
wr,
qd.byte_order (),