From a55eaba7fab0f2d337029b929a5601a57e505f07 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Tue, 7 Jul 2015 18:10:47 +0200 Subject: Network: Fixed ServerHandle's address formatting. --- src/OSSupport/ServerHandleImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/OSSupport/ServerHandleImpl.cpp') diff --git a/src/OSSupport/ServerHandleImpl.cpp b/src/OSSupport/ServerHandleImpl.cpp index 44ace448b..6f0a1ee16 100644 --- a/src/OSSupport/ServerHandleImpl.cpp +++ b/src/OSSupport/ServerHandleImpl.cpp @@ -294,14 +294,14 @@ void cServerHandleImpl::Callback(evconnlistener * a_Listener, evutil_socket_t a_ case AF_INET: { sockaddr_in * sin = reinterpret_cast(a_Addr); - evutil_inet_ntop(AF_INET, sin, IPAddress, ARRAYCOUNT(IPAddress)); + evutil_inet_ntop(AF_INET, &(sin->sin_addr), IPAddress, ARRAYCOUNT(IPAddress)); Port = ntohs(sin->sin_port); break; } case AF_INET6: { sockaddr_in6 * sin6 = reinterpret_cast(a_Addr); - evutil_inet_ntop(AF_INET, sin6, IPAddress, ARRAYCOUNT(IPAddress)); + evutil_inet_ntop(AF_INET6, &(sin6->sin6_addr), IPAddress, ARRAYCOUNT(IPAddress)); Port = ntohs(sin6->sin6_port); break; } -- cgit v1.2.3