summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-08-25 15:29:37 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-08-25 15:29:37 +0000
commit4b58a90c24c9df4f17d7eaaa96ddcaaacaf7f5d4 (patch)
tree31cf1f6b724843f4326b71ea77c9da4b6292642f
parentb0c6684410a5a0f0c21e5fc2cb1ef119c0a9e4e0 (diff)
downloadATCD-4b58a90c24c9df4f17d7eaaa96ddcaaacaf7f5d4.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog12
-rw-r--r--ChangeLogs/ChangeLog-02a12
-rw-r--r--ChangeLogs/ChangeLog-03a12
-rw-r--r--ace/Log_Msg.h2
-rw-r--r--tests/Svc_Handler_Test.cpp11
5 files changed, 44 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e5c8ab2b2e..fcb6c75ccf6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Sat Aug 25 10:16:21 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
+
+ * tests/Svc_Handler_Test.cpp (main): The destructor of svc_handler
+ will close file_io, so we don't need to do it explicitly!
+
+ * ace/Log_Msg.h (ACE_Log_Msg): Increased the size of the buffer
+ used to store log records to account for the NUL-terminator.
+
+ * tests/Svc_Handler_Test.cpp (main): Changed the buffer size
+ and NUL-terminated the buffer so that things print correctly.
+ Thanks to Nanbor for finding this.
+
Sat Aug 25 09:00:28 2001 Balachandran Natarajan <bala@cs.wustl.edu>
* ace/TP_Reactor.cpp:
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 1e5c8ab2b2e..fcb6c75ccf6 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,15 @@
+Sat Aug 25 10:16:21 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
+
+ * tests/Svc_Handler_Test.cpp (main): The destructor of svc_handler
+ will close file_io, so we don't need to do it explicitly!
+
+ * ace/Log_Msg.h (ACE_Log_Msg): Increased the size of the buffer
+ used to store log records to account for the NUL-terminator.
+
+ * tests/Svc_Handler_Test.cpp (main): Changed the buffer size
+ and NUL-terminated the buffer so that things print correctly.
+ Thanks to Nanbor for finding this.
+
Sat Aug 25 09:00:28 2001 Balachandran Natarajan <bala@cs.wustl.edu>
* ace/TP_Reactor.cpp:
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 1e5c8ab2b2e..fcb6c75ccf6 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,15 @@
+Sat Aug 25 10:16:21 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
+
+ * tests/Svc_Handler_Test.cpp (main): The destructor of svc_handler
+ will close file_io, so we don't need to do it explicitly!
+
+ * ace/Log_Msg.h (ACE_Log_Msg): Increased the size of the buffer
+ used to store log records to account for the NUL-terminator.
+
+ * tests/Svc_Handler_Test.cpp (main): Changed the buffer size
+ and NUL-terminated the buffer so that things print correctly.
+ Thanks to Nanbor for finding this.
+
Sat Aug 25 09:00:28 2001 Balachandran Natarajan <bala@cs.wustl.edu>
* ace/TP_Reactor.cpp:
diff --git a/ace/Log_Msg.h b/ace/Log_Msg.h
index 3ea3af2a85a..ffe82515e9a 100644
--- a/ace/Log_Msg.h
+++ b/ace/Log_Msg.h
@@ -527,7 +527,7 @@ private:
/// The log message, which resides in thread-specific storage. Note
/// that only the current log message is stored here -- it will be
/// overwritten by the subsequent call to <log>.
- ACE_TCHAR msg_[ACE_Log_Record::MAXLOGMSGLEN];
+ ACE_TCHAR msg_[ACE_Log_Record::MAXLOGMSGLEN + 1]; // Add one for NUL-terminator.
/// Indicates whether we should restart system calls that are
/// interrupted.
diff --git a/tests/Svc_Handler_Test.cpp b/tests/Svc_Handler_Test.cpp
index 0c46f5c9f15..717a8fd5e40 100644
--- a/tests/Svc_Handler_Test.cpp
+++ b/tests/Svc_Handler_Test.cpp
@@ -124,24 +124,27 @@ main (int argc, ACE_TCHAR *argv[])
ACE_TEXT ("connect failed for %p\n"),
file.get_path_name ()),
1);
- char buf[17];
+ char buf[ACE_Log_Record::MAXLOGMSGLEN + 1];
ACE_LOG_MSG->clr_flags (ACE_Log_Msg::VERBOSE_LITE);
ACE_FILE_Info info;
file_io.get_info (info);
ACE_DEBUG ((LM_DEBUG, "file size = %d\n", info.size_));
- for (ssize_t n_bytes; (n_bytes = file_io.recv (buf, sizeof buf)) > 0; )
- ACE_DEBUG ((LM_DEBUG, "%*s", n_bytes, buf));
+ for (ssize_t n_bytes; (n_bytes = file_io.recv (buf, ACE_Log_Record::MAXLOGMSGLEN)) > 0; )
+ {
+ buf[n_bytes] = '\0';
+ ACE_DEBUG ((LM_DEBUG, "%s", buf));
+ }
ACE_DEBUG ((LM_DEBUG, "\n"));
- file_io.close ();
if (file_io.unlink () == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("unlink failed for %p\n"),
file.get_path_name ()),
1);
+ // Destructor of svc_handler will close file_io.
}
ACE_END_TEST;