From f1665ac7fbff068ffc2c2f3f110645609b73806c Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 19 Nov 2014 11:01:10 +0100 Subject: [PATCH] inet_ntoa() want's the address directly, not a pointer to it --- common/network/TcpSocket.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx index 3129a93e..d1238754 100644 --- a/common/network/TcpSocket.cxx +++ b/common/network/TcpSocket.cxx @@ -274,7 +274,7 @@ char* TcpSocket::getPeerAddress() { return rfb::strDup(""); } - char* name = inet_ntoa(addr); + char* name = inet_ntoa(sa.u.sin.sin_addr); #endif /* HAVE_INET_PTON */ if (name) { return rfb::strDup(name); -- 2.39.5