From 94141fc50ce9d2108bfc23becaa26a488d88698d Mon Sep 17 00:00:00 2001 From: Steve Huston Date: Fri, 28 Mar 2003 15:23:27 +0000 Subject: ChangeLogTag:Fri Mar 28 10:18:48 2003 Steve Huston --- tests/Conn_Test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/Conn_Test.cpp') 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 (); -- cgit v1.2.1