summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-12-28 19:20:30 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-12-28 19:20:30 +0000
commitd027ce8bc000d4f727ec062a41f087ccaf5cbfe9 (patch)
tree0f5a9c3babd2ef1f0a37066ac73994805aa7c345
parentc2abd92ebc5cc27955e4612a32f7af2cb787b7b9 (diff)
downloadATCD-d027ce8bc000d4f727ec062a41f087ccaf5cbfe9.tar.gz
ChangeLogTag:Sat Dec 28 13:16:24 2002 Nanbor Wang <nanbor@cs.wustl.edu>
-rw-r--r--ChangeLog15
-rw-r--r--ChangeLogs/ChangeLog-03a15
-rw-r--r--ace/MEM_IO.cpp8
-rw-r--r--tests/MEM_Stream_Test.cpp11
4 files changed, 41 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 475c52dff17..7bdc75a0b54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Sat Dec 28 13:16:24 2002 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * ace/MEM_IO.cpp (recv_buf): Reverted my previous hack in:
+
+ Fri Dec 27 08:38:29 2002 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ and make the connection close handling more robust.
+
+ * tests/MEM_Stream_Test.cpp: Reverted my previous change in:
+
+ Sat Dec 28 11:04:38 2002 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ It was not necessary. Added debug information for close
+ connection.
+
Sat Dec 28 11:04:38 2002 Nanbor Wang <nanbor@cs.wustl.edu>
* tests/MEM_Stream_Test.cpp: Made sure this test ignore the EIO
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 475c52dff17..7bdc75a0b54 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,18 @@
+Sat Dec 28 13:16:24 2002 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * ace/MEM_IO.cpp (recv_buf): Reverted my previous hack in:
+
+ Fri Dec 27 08:38:29 2002 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ and make the connection close handling more robust.
+
+ * tests/MEM_Stream_Test.cpp: Reverted my previous change in:
+
+ Sat Dec 28 11:04:38 2002 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ It was not necessary. Added debug information for close
+ connection.
+
Sat Dec 28 11:04:38 2002 Nanbor Wang <nanbor@cs.wustl.edu>
* tests/MEM_Stream_Test.cpp: Made sure this test ignore the EIO
diff --git a/ace/MEM_IO.cpp b/ace/MEM_IO.cpp
index fcd02b73282..a745a1b3b9b 100644
--- a/ace/MEM_IO.cpp
+++ b/ace/MEM_IO.cpp
@@ -48,11 +48,9 @@ ACE_Reactive_MEM_IO::recv_buf (ACE_MEM_SAP_Node *&buf,
if (retv == 0)
{
- // Something bad has happened. It looks like only Solaris and
- // Win32 will fall into this place when the other end closes the
- // connection.
- errno = EIO;
- return -1;
+ // ACE_DEBUG ((LM_INFO, "MEM_Stream closed\n"));
+ buf = 0;
+ return 0;
}
else if (retv != sizeof (off_t))
{
diff --git a/tests/MEM_Stream_Test.cpp b/tests/MEM_Stream_Test.cpp
index 588a71d95dc..1d9bc4bb572 100644
--- a/tests/MEM_Stream_Test.cpp
+++ b/tests/MEM_Stream_Test.cpp
@@ -109,12 +109,17 @@ Echo_Handler::handle_input (ACE_HANDLE)
len = this->peer ().recv (buf, MAXPATHLEN * sizeof (ACE_TCHAR));
- if (len == -1 && errno != EIO)
+ if (len == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("Error receiving from MEM_Stream\n")),
-1);
- else if (len == 0)
- return -1;
+ else if (len == 0) // Connection closed.
+ {
+ ACE_DEBUG ((LM_INFO,
+ ACE_TEXT ("Connection %d closed\n"),
+ this->connection_));
+ return -1;
+ }
ACE_TCHAR return_buf[MAXPATHLEN];
ACE_OS::strcpy (return_buf, this->name_);