summaryrefslogtreecommitdiff
path: root/ace/Message_Block.cpp
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2002-11-11 01:42:31 +0000
committerbala <balanatarajan@users.noreply.github.com>2002-11-11 01:42:31 +0000
commit684947667cf46ce013e29c54f932102b4fb26117 (patch)
tree13252d8d35a0229151045c99bb9da8ba6acc6adb /ace/Message_Block.cpp
parent7adec445a87c9b0079ede20a4f6394cd5f1ae0cf (diff)
downloadATCD-684947667cf46ce013e29c54f932102b4fb26117.tar.gz
ChangeLogTag: Sun Nov 10 19:38:45 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
Diffstat (limited to 'ace/Message_Block.cpp')
-rw-r--r--ace/Message_Block.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/ace/Message_Block.cpp b/ace/Message_Block.cpp
index 5a2f29d4af6..0602c032c6a 100644
--- a/ace/Message_Block.cpp
+++ b/ace/Message_Block.cpp
@@ -76,8 +76,11 @@ ACE_Message_Block::copy (const char *buf, size_t n)
ACE_TRACE ("ACE_Message_Block::copy");
// Note that for this to work correct, end() *must* be >= wr_ptr().
- size_t len = ACE_static_cast(size_t,
- this->end () - this->wr_ptr ());
+ /*size_t len = ACE_static_cast(size_t,
+ this->end () - this->wr_ptr ());*/
+
+ size_t len = this->space ();
+
if (len < n)
return -1;
else
@@ -96,8 +99,10 @@ ACE_Message_Block::copy (const char *buf)
ACE_TRACE ("ACE_Message_Block::copy");
// Note that for this to work correct, end() *must* be >= wr_ptr().
- size_t len = ACE_static_cast(size_t,
- (this->end () - this->wr_ptr ()));
+ /* size_t len = ACE_static_cast(size_t,
+ (this->end () - this->wr_ptr ())); */
+ size_t len = this->space ();
+
size_t buflen = ACE_OS::strlen (buf) + 1;
if (len < buflen)