summaryrefslogtreecommitdiff
path: root/TAO/tao/Sequence.cpp
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2001-07-19 05:43:21 +0000
committerbala <balanatarajan@users.noreply.github.com>2001-07-19 05:43:21 +0000
commit0a186a1f31fc37ece23ecff6f99dce4b8853f92d (patch)
tree301b63c6f4e35a704e071cd1be06956b2d2a2b46 /TAO/tao/Sequence.cpp
parentcdf423ac9fa4f9733e1d63810f299a67e3211499 (diff)
downloadATCD-0a186a1f31fc37ece23ecff6f99dce4b8853f92d.tar.gz
ChangeLogTag:Tue Jul 19 12:49:31 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Sequence.cpp')
-rw-r--r--TAO/tao/Sequence.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/TAO/tao/Sequence.cpp b/TAO/tao/Sequence.cpp
index 5ba4c65749b..5e6f6e98a10 100644
--- a/TAO/tao/Sequence.cpp
+++ b/TAO/tao/Sequence.cpp
@@ -676,7 +676,18 @@ TAO_Unbounded_Sequence (CORBA::ULong length,
ACE_Message_Block msgb (*mb,
ACE_CDR::MAX_ALIGNMENT);
+ // Get the base pointer of the incoming message block
+ char *start = ACE_ptr_align_binary (mb->base (),
+ ACE_CDR::MAX_ALIGNMENT);
+
+ // Get the read and write displacements in the incoming stream
+ size_t rd_pos = mb->rd_ptr () - start;
+ size_t wr_pos = mb->wr_ptr () - start;
+
this->mb_ = ACE_Message_Block::duplicate (&msgb);
+
+ this->mb_->rd_ptr (rd_pos);
+ this->mb_->wr_ptr (wr_pos);
}
}
#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */