summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a8
-rw-r--r--TAO/tao/Strategies/GIOP_Message_NonReactive_Base.cpp9
-rw-r--r--TAO/tao/Strategies/GIOP_Message_NonReactive_Handler.cpp22
3 files changed, 26 insertions, 13 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 324b4d87cbd..96e7129356b 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,11 @@
+Thu May 17 12:10:26 2001 Balachandran Natarajan <bala@cs.wustl.edu>
+
+ * tao/Strategies/GIOP_Message_NonReactive_Handler.cpp: Added a
+ check for the case when we get an errno of EAGAIN.
+
+ * tao/Strategies/GIOP_Message_NonReactive_Base.cpp: Cosmetic
+ changes.
+
Thu May 17 11:03:12 2001 Frank Hunleth <fhunleth@cs.wustl.edu>
* examples/PluggableUDP/tests/Basic/client.dsp:
diff --git a/TAO/tao/Strategies/GIOP_Message_NonReactive_Base.cpp b/TAO/tao/Strategies/GIOP_Message_NonReactive_Base.cpp
index b1167496e9a..f69ec58ab89 100644
--- a/TAO/tao/Strategies/GIOP_Message_NonReactive_Base.cpp
+++ b/TAO/tao/Strategies/GIOP_Message_NonReactive_Base.cpp
@@ -30,8 +30,8 @@ TAO_GIOP_Message_NonReactive_Base::read_message (TAO_Transport *transport,
// Error in the message that was received
- if (retval == -1)
- return -1;
+ if (retval <= 0)
+ return retval;
// Get the message state
TAO_GIOP_Message_State &state =
@@ -46,14 +46,13 @@ TAO_GIOP_Message_NonReactive_Base::read_message (TAO_Transport *transport,
TAO_InputCDR &cdr =
this->message_handler_.input_cdr ();
- char *buf = cdr.rd_ptr ();
+ char *base = cdr.start ()->base ();
- buf -= TAO_GIOP_MESSAGE_HEADER_LEN;
size_t len = cdr.length () + TAO_GIOP_MESSAGE_HEADER_LEN;
this->dump_msg ("Recv",
ACE_reinterpret_cast (u_char *,
- buf),
+ base),
len);
}
diff --git a/TAO/tao/Strategies/GIOP_Message_NonReactive_Handler.cpp b/TAO/tao/Strategies/GIOP_Message_NonReactive_Handler.cpp
index 7f3b35b9f62..5650aba7414 100644
--- a/TAO/tao/Strategies/GIOP_Message_NonReactive_Handler.cpp
+++ b/TAO/tao/Strategies/GIOP_Message_NonReactive_Handler.cpp
@@ -99,16 +99,18 @@ TAO_GIOP_Message_NonReactive_Handler::read_parse_message(TAO_Transport *transpor
buf = this->input_cdr_.rd_ptr ();
// Read the rest of the message
- if (this->read_message (transport,
- buf,
- msg_size - TAO_GIOP_MESSAGE_HEADER_LEN,
- max_wait_time) == -1)
+ int retval = this->read_message (transport,
+ buf,
+ msg_size - TAO_GIOP_MESSAGE_HEADER_LEN,
+ max_wait_time);
+ if (retval <= 0)
{
if (TAO_debug_level > 1)
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) : (%N | %l) \n")
- ACE_TEXT ("Error during message read \n")));
- return -1;
+ ACE_TEXT ("(%P|%t) Error during message read \n")));
+
+ return retval;
}
// Parse the GIOP fragment header.
@@ -129,7 +131,7 @@ TAO_GIOP_Message_NonReactive_Handler::read_parse_message(TAO_Transport *transpor
// Now we have parsed almost every thing that is part of the GIOP
// header. Return a succes value
- return 0;
+ return 1;
}
@@ -160,9 +162,13 @@ TAO_GIOP_Message_NonReactive_Handler::read_message (TAO_Transport *transport,
// @@ Do we need to check for errno != EWOULDBLOCK?? and errno ==
// @@ ECONNRESET. Does such things make sense here??
+ if (bytes == -1 && errno == EAGAIN)
+ return 0;
+
if (bytes == 0 ||
bytes == -1)
- return bytes;
+ return -1;
+
buf += bytes;
}