diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-08-25 15:29:37 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-08-25 15:29:37 +0000 |
commit | d11b1555cbb59619218f4b49e792ddb44a596af9 (patch) | |
tree | 31cf1f6b724843f4326b71ea77c9da4b6292642f /tests/Svc_Handler_Test.cpp | |
parent | 4f636c0851ab7e8ff5864c02bc3ce21940529ecc (diff) | |
download | ATCD-d11b1555cbb59619218f4b49e792ddb44a596af9.tar.gz |
*** empty log message ***
Diffstat (limited to 'tests/Svc_Handler_Test.cpp')
-rw-r--r-- | tests/Svc_Handler_Test.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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; |