summaryrefslogtreecommitdiff
path: root/tests/Conn_Test.cpp
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2003-03-28 15:23:27 +0000
committerSteve Huston <shuston@riverace.com>2003-03-28 15:23:27 +0000
commit94141fc50ce9d2108bfc23becaa26a488d88698d (patch)
tree6f77e28ad27b25e481d58eabc7c45d6b646eb2df /tests/Conn_Test.cpp
parent8bf829cc0df3e04103a8e01ff3d570275b8e1bfd (diff)
downloadATCD-94141fc50ce9d2108bfc23becaa26a488d88698d.tar.gz
ChangeLogTag:Fri Mar 28 10:18:48 2003 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'tests/Conn_Test.cpp')
-rw-r--r--tests/Conn_Test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/Conn_Test.cpp b/tests/Conn_Test.cpp
index 61e18592314..7dd4842f45f 100644
--- a/tests/Conn_Test.cpp
+++ b/tests/Conn_Test.cpp
@@ -567,6 +567,7 @@ server (void *arg)
ACCEPTOR *acceptor = (ACCEPTOR *) arg;
ACE_INET_Addr cli_addr;
+ ACE_TCHAR peer_host[MAXHOSTNAMELEN];
const ACE_Time_Value tv (ACE_DEFAULT_TIMEOUT);
ACE_Synch_Options options (ACE_Synch_Options::USE_TIMEOUT, tv);
@@ -610,9 +611,12 @@ server (void *arg)
ACE_TEXT ("accept failed, shutting down")),
0);
}
+ // Use this rather than get_host_name() to properly adjust to the
+ // charset width in use.
+ cli_addr.get_host_name (peer_host, MAXHOSTNAMELEN);
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P|%t) client %s connected from %d\n"),
- cli_addr.get_host_name (),
+ peer_host,
cli_addr.get_port_number ()));
svc_handler->recv_data ();