summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-01-24 20:03:29 +0100
committerMattes D <github@xoft.cz>2015-01-27 14:53:30 +0100
commit1f2f8b553b2f5080beed9f995066a1ec863228ca (patch)
tree9c3da9233fcbe9f23ab7f3b6171ae19e4b5be6d4
parentProtocol18: Fixed failure with invalig logfile names. (diff)
downloadcuberite-1f2f8b553b2f5080beed9f995066a1ec863228ca.tar
cuberite-1f2f8b553b2f5080beed9f995066a1ec863228ca.tar.gz
cuberite-1f2f8b553b2f5080beed9f995066a1ec863228ca.tar.bz2
cuberite-1f2f8b553b2f5080beed9f995066a1ec863228ca.tar.lz
cuberite-1f2f8b553b2f5080beed9f995066a1ec863228ca.tar.xz
cuberite-1f2f8b553b2f5080beed9f995066a1ec863228ca.tar.zst
cuberite-1f2f8b553b2f5080beed9f995066a1ec863228ca.zip
-rw-r--r--src/OSSupport/ServerHandleImpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/OSSupport/ServerHandleImpl.cpp b/src/OSSupport/ServerHandleImpl.cpp
index ba38dbf2e..2485c8e1b 100644
--- a/src/OSSupport/ServerHandleImpl.cpp
+++ b/src/OSSupport/ServerHandleImpl.cpp
@@ -256,19 +256,20 @@ void cServerHandleImpl::Callback(evconnlistener * a_Listener, evutil_socket_t a_
// Get the textual IP address and port number out of a_Addr:
char IPAddress[128];
- evutil_inet_ntop(a_Addr->sa_family, a_Addr->sa_data, IPAddress, ARRAYCOUNT(IPAddress));
UInt16 Port = 0;
switch (a_Addr->sa_family)
{
case AF_INET:
{
sockaddr_in * sin = reinterpret_cast<sockaddr_in *>(a_Addr);
+ evutil_inet_ntop(AF_INET, sin, IPAddress, ARRAYCOUNT(IPAddress));
Port = ntohs(sin->sin_port);
break;
}
case AF_INET6:
{
sockaddr_in6 * sin6 = reinterpret_cast<sockaddr_in6 *>(a_Addr);
+ evutil_inet_ntop(AF_INET, sin6, IPAddress, ARRAYCOUNT(IPAddress));
Port = ntohs(sin6->sin6_port);
break;
}