summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-08-17 22:20:03 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-08-17 22:20:03 +0000
commit928b6413a9611eefb8da520f69d034293b9989ee (patch)
tree78dce21c37a77ac99d38a4c5f301eefbb248884b
parent4f6213ecb2e03408d0730642eb82735214bca18a (diff)
downloadATCD-928b6413a9611eefb8da520f69d034293b9989ee.tar.gz
ChangeLogTag: Fri Aug 17 16:56:16 2001 Jeff Parsons <parsons@cs.wustl.edu>
-rw-r--r--ace/CDR_Stream.cpp7
-rw-r--r--ace/CDR_Stream.h3
-rw-r--r--ace/CDR_Stream.i10
3 files changed, 15 insertions, 5 deletions
diff --git a/ace/CDR_Stream.cpp b/ace/CDR_Stream.cpp
index 610c6f6e9e3..38c871864f7 100644
--- a/ace/CDR_Stream.cpp
+++ b/ace/CDR_Stream.cpp
@@ -941,6 +941,7 @@ ACE_InputCDR::read_wstring (ACE_CDR::WChar*& x)
return 1;
}
+ this->good_bit_ = 0;
x = 0;
return 0;
}
@@ -1017,7 +1018,7 @@ ACE_InputCDR::read_boolean_array (ACE_CDR::Boolean *x,
ACE_CDR::Boolean
ACE_InputCDR::read_1 (ACE_CDR::Octet *x)
{
- if (this->rd_ptr () < this->end ())
+ if (this->rd_ptr () < this->wr_ptr ())
{
*x = *ACE_reinterpret_cast (ACE_CDR::Octet*,this->rd_ptr());
this->start_.rd_ptr (1);
@@ -1159,7 +1160,7 @@ ACE_InputCDR::skip_string (void)
ACE_CDR::ULong len;
if (this->read_ulong (len))
{
- if (this->rd_ptr () + len <= this->end ())
+ if (this->rd_ptr () + len <= this->wr_ptr ())
{
this->rd_ptr (len);
return 1;
@@ -1193,7 +1194,7 @@ ACE_InputCDR::skip_wstring (void)
ACE_CDR::Boolean
ACE_InputCDR::skip_bytes (size_t len)
{
- if (this->rd_ptr () + len <= this->end ())
+ if (this->rd_ptr () + len <= this->wr_ptr ())
{
this->rd_ptr (len);
return 1;
diff --git a/ace/CDR_Stream.h b/ace/CDR_Stream.h
index 4a783efc4cc..ad065753dc7 100644
--- a/ace/CDR_Stream.h
+++ b/ace/CDR_Stream.h
@@ -764,6 +764,9 @@ public:
/// Returns the current position for the rd_ptr....
char* rd_ptr (void);
+ /// Returns the current position for the wr_ptr....
+ char* wr_ptr (void);
+
/// Return how many bytes are left in the stream.
size_t length (void) const;
diff --git a/ace/CDR_Stream.i b/ace/CDR_Stream.i
index 400c1b9d3e9..de0d13e70cb 100644
--- a/ace/CDR_Stream.i
+++ b/ace/CDR_Stream.i
@@ -882,6 +882,12 @@ ACE_InputCDR::rd_ptr (void)
return this->start_.rd_ptr ();
}
+ACE_INLINE char*
+ACE_InputCDR::wr_ptr (void)
+{
+ return this->start_.wr_ptr ();
+}
+
ACE_INLINE int
ACE_InputCDR::adjust (size_t size,
size_t align,
@@ -889,7 +895,7 @@ ACE_InputCDR::adjust (size_t size,
{
buf = ACE_ptr_align_binary (this->rd_ptr (), align);
char *end = buf + size;
- if (end <= this->end ())
+ if (end <= this->wr_ptr ())
{
this->start_.rd_ptr (end);
return 0;
@@ -1329,7 +1335,7 @@ ACE_InputCDR::align_read_ptr (size_t alignment)
char *buf = ACE_ptr_align_binary (this->rd_ptr (),
alignment);
- if (buf <= this->end ())
+ if (buf <= this->wr_ptr ())
{
this->start_.rd_ptr (buf);
return 0;