summaryrefslogtreecommitdiff
path: root/TAO/tao/Transport.cpp
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2001-07-21 04:22:40 +0000
committerbala <balanatarajan@users.noreply.github.com>2001-07-21 04:22:40 +0000
commitf5a884614d9b32d3a8776a577c0ec0a1fc7b99d6 (patch)
treec806e91165f6148b617f8425a4683af84df5d95d /TAO/tao/Transport.cpp
parentfe650489e6cd48d7c77572d5d3a20658457b214f (diff)
downloadATCD-f5a884614d9b32d3a8776a577c0ec0a1fc7b99d6.tar.gz
ChangeLogTag:Fri Jul 20 23:58:12 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Transport.cpp')
-rw-r--r--TAO/tao/Transport.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index a1013295475..a91348edf7a 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -1004,23 +1004,23 @@ TAO_Transport::consolidate_message (ACE_Message_Block &incoming,
missing_data,
max_wait_time);
- // If we got an EWOULDBLOCK or some other error..
- if (n <= 0)
+ // If we got an error..
+ if (n == -1)
{
- if (n == -1)
+ if (TAO_debug_level > 4)
{
- if (TAO_debug_level > 4)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - TAO_Trasport::consolidate_message,"
- "error while trying to consolidate \n"));
- }
- this->tms_->connection_closed ();
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Trasport::consolidate_message,"
+ "error while trying to consolidate \n"));
}
-
- return n;
+ this->tms_->connection_closed ();
+ return -1;
}
+ // If we had gooten a EWOULDBLOCK n would be equal to zero. But we
+ // have to put the message in the queue anyway. So let us proceed
+ // to do that and return...
+
// Move the write pointer
incoming.wr_ptr (n);
@@ -1167,9 +1167,11 @@ TAO_Transport::consolidate_message_queue (ACE_Message_Block &incoming,
max_wait_time);
// Error...
- if (n <= 0)
+ if (n < 0)
return n;
+ // If we get a EWOULDBLOCK ie. n==0, we should anyway put the
+ // message in queue before returning..
// Move the write pointer
qd->msg_block_->wr_ptr (n);