summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2001-07-19 14:28:03 +0000
committerbala <balanatarajan@users.noreply.github.com>2001-07-19 14:28:03 +0000
commitbf237c6fb5399e413b0e2b8d05385dfe5eb49605 (patch)
treefd452dfee35a5fa388715494a0ef75af96aa2784
parent7eefa666aceb8a1009cdcb73b13e6408ec754c98 (diff)
downloadATCD-bf237c6fb5399e413b0e2b8d05385dfe5eb49605.tar.gz
ChangeLogTag:Tue Jul 19 09:30:31 2001 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a9
-rw-r--r--TAO/tao/GIOP_Message_Base.cpp2
-rw-r--r--TAO/tao/Transport.cpp40
3 files changed, 35 insertions, 16 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 93cf33fb3a3..11f7f5d252b 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,12 @@
+Tue Jul 19 09:30:31 2001 Balachandran Natarajan <bala@cs.wustl.edu>
+
+ * tao/Transport.cpp (make_queued_data): Created a data block for
+ the size that is required instead of the size of the incoming
+ data block. This should fix the lingering problems with
+ Single_Read tests in our daily builds.
+
+ * tao/GIOP_Message_Base.cpp: Added some comments.
+
Tue Jul 19 09:34:00 2001 Craig Rodrigues <crodrigu@bbn.com>
* orbsvcs/tests/AVStreams/Component_Switching/sender.bor:
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp
index 28b43bec158..c9c4fe10904 100644
--- a/TAO/tao/GIOP_Message_Base.cpp
+++ b/TAO/tao/GIOP_Message_Base.cpp
@@ -1370,6 +1370,8 @@ TAO_GIOP_Message_Base::make_queued_data (size_t sz)
TAO_Queued_Data *qd =
TAO_Queued_Data::get_queued_data ();
+ // @@todo: We have a similar method in Transport.cpp. Need to see how
+ // we can factor them out..
// Make a datablock for the size requested + something. The
// "something" is required because we are going to align the data
// block in the message block. During alignment we could loose some
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index 319ea1b6714..1d6a048c1ca 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -1393,22 +1393,30 @@ TAO_Transport::make_queued_data (ACE_Message_Block &incoming)
else
{
// As we are in CORBA mode, all the data blocks would be aligned
- // on an 8 byte boundary
- ACE_Message_Block msgb (incoming,
- ACE_CDR::MAX_ALIGNMENT);
-
- qd->msg_block_ = ACE_Message_Block::duplicate (&msgb);
-
- // Get the base pointer of the incoming message block
- char *start = ACE_ptr_align_binary (incoming.base (),
- ACE_CDR::MAX_ALIGNMENT);
-
- // Get the read and write displacements in the incoming stream
- size_t rd_pos = incoming.rd_ptr () - start;
- size_t wr_pos = incoming.wr_ptr () - start;
-
- qd->msg_block_->rd_ptr (rd_pos);
- qd->msg_block_->wr_ptr (wr_pos);
+ // on an 8 byte boundary. Hence create a data block for more
+ // than the actual length
+ ACE_Data_Block *db =
+ this->orb_core_->data_block_for_message_block (incoming.length ()+
+ ACE_CDR::MAX_ALIGNMENT);
+
+ // Get the allocator..
+ ACE_Allocator *alloc =
+ this->orb_core_->message_block_msgblock_allocator ();
+
+ // Make message block..
+ ACE_Message_Block mb (db,
+ 0,
+ alloc);
+
+ // Duplicate the block..
+ qd->msg_block_ = mb.duplicate ();
+
+ // Align the message block
+ ACE_CDR::mb_align (qd->msg_block_);
+
+ // Copy the data..
+ qd->msg_block_->copy (incoming.rd_ptr (),
+ incoming.length ());
}