summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-02-25 18:28:24 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-02-25 18:28:24 +0000
commitd31de981546b92313a841fe0fd2b284c9f5ee56b (patch)
tree6a0249e21d5391abbf89bf3037409b02c66fc318 /TAO/tao
parent6888055b97f01944b97fb3699aec4a9307d23153 (diff)
downloadATCD-d31de981546b92313a841fe0fd2b284c9f5ee56b.tar.gz
ChangeLogTag:Sun Feb 25 10:22:59 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/Queued_Message.cpp13
-rw-r--r--TAO/tao/Queued_Message.h7
-rw-r--r--TAO/tao/Transport.cpp2
3 files changed, 12 insertions, 10 deletions
diff --git a/TAO/tao/Queued_Message.cpp b/TAO/tao/Queued_Message.cpp
index e8b7788f8ea..94ad78e1662 100644
--- a/TAO/tao/Queued_Message.cpp
+++ b/TAO/tao/Queued_Message.cpp
@@ -16,6 +16,7 @@ TAO_Queued_Message::TAO_Queued_Message (ACE_Message_Block *contents,
: contents_ (contents)
, own_contents_ (own_contents)
, callback_ (callback)
+ , current_block_ (contents)
, next_ (0)
, prev_ (0)
{
@@ -62,20 +63,14 @@ TAO_Queued_Message::bytes_transferred (size_t byte_count)
{
while (!this->done () && byte_count > 0)
{
- size_t l = this->contents_->length ();
+ size_t l = this->current_block_->length ();
if (byte_count < l)
{
- this->contents_->rd_ptr (byte_count);
+ this->current_block_->rd_ptr (byte_count);
return;
}
- ACE_Message_Block *cont = this->contents_->cont ();
byte_count -= l;
- if (this->own_contents_)
- {
- this->contents_->cont (0);
- ACE_Message_Block::release (this->contents_);
- }
- this->contents_ = cont;
+ this->current_block_ = this->current_block_->cont ();
}
}
diff --git a/TAO/tao/Queued_Message.h b/TAO/tao/Queued_Message.h
index 8b194bd162e..25d4a018b9e 100644
--- a/TAO/tao/Queued_Message.h
+++ b/TAO/tao/Queued_Message.h
@@ -163,6 +163,13 @@ private:
*/
TAO_Message_Sent_Callback *callback_;
+ /// The current message block
+ /**
+ * The message may be set in multiple writev() operations. This
+ * point keeps track of the next message to send out.
+ */
+ ACE_Message_Block *current_block_;
+
/// Implement an intrusive double-linked list for the message queue
TAO_Queued_Message *next_;
TAO_Queued_Message *prev_;
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index 5a72f7501e8..2138def3e21 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -277,7 +277,7 @@ TAO_Transport::send_message_i (TAO_Stub *stub,
// @@ I don't think we want to hold the mutex here, however if
// we release it we need to recheck the status of the transport
// after we return... once I understand the final form for this
- // code I will re-visit this stuff.
+ // code I will re-visit this decision
ssize_t n = this->send_message_block_chain (message_block,
byte_count,
max_wait_time);