diff options
author | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-10 22:50:02 +0000 |
---|---|---|
committer | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-10 22:50:02 +0000 |
commit | e01f1c53dd67d299e2d5ea0398c1dc556229ba24 (patch) | |
tree | 97b085442b778edff5d9e64046da037f3eefdc67 /TAO/tao/OctetSeqC.cpp | |
parent | b35b5604605a559a61c8be8826ea1faff1b053ba (diff) | |
download | ATCD-e01f1c53dd67d299e2d5ea0398c1dc556229ba24.tar.gz |
ChangeLogTag:Tue Apr 10 17:25:18 2001 Pradeep Gore <pradeep@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/OctetSeqC.cpp')
-rw-r--r-- | TAO/tao/OctetSeqC.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/TAO/tao/OctetSeqC.cpp b/TAO/tao/OctetSeqC.cpp index 66a5b423353..b1e74bf1ca5 100644 --- a/TAO/tao/OctetSeqC.cpp +++ b/TAO/tao/OctetSeqC.cpp @@ -32,6 +32,7 @@ #include "Any.h" #include "CDR.h" #include "Typecode.h" +#include "ORB_Core.h" #if !defined (_CORBA_OCTETSEQ_CS_) #define _CORBA_OCTETSEQ_CS_ @@ -235,15 +236,18 @@ CORBA::Boolean operator>> ( // retrieve all the elements #if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - if (ACE_BIT_DISABLED (strm.start ()->flags (),ACE_Message_Block::DONT_DELETE)) - { - TAO_Unbounded_Sequence<CORBA::Octet> *oseq = - ACE_static_cast(TAO_Unbounded_Sequence<CORBA::Octet>*, &_tao_sequence); - oseq->replace (_tao_seq_len, strm.start ()); - oseq->mb ()->wr_ptr (oseq->mb()->rd_ptr () + _tao_seq_len); - strm.skip_bytes (_tao_seq_len); - return 1; - } + if (ACE_BIT_DISABLED (strm.start ()->flags (), + ACE_Message_Block::DONT_DELETE) + && + strm.orb_core ()->resource_factory ()->input_cdr_allocator_type_locked () == 1) + { + TAO_Unbounded_Sequence<CORBA::Octet> *oseq = + ACE_static_cast(TAO_Unbounded_Sequence<CORBA::Octet>*, &_tao_sequence); + oseq->replace (_tao_seq_len, strm.start ()); + oseq->mb ()->wr_ptr (oseq->mb()->rd_ptr () + _tao_seq_len); + strm.skip_bytes (_tao_seq_len); + return 1; + } else return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len); |