]> source.dussan.org Git - tigervnc.git/commitdiff
inet_ntoa() want's the address directly, not a pointer to it
authorPierre Ossman <ossman@cendio.se>
Wed, 19 Nov 2014 10:01:10 +0000 (11:01 +0100)
committerPierre Ossman <ossman@cendio.se>
Wed, 19 Nov 2014 10:01:10 +0000 (11:01 +0100)
common/network/TcpSocket.cxx

index 3129a93e69492daffcd5533510ac4962f28b74b9..d12387549a904bb44c58fe4b21e71959b2f75b29 100644 (file)
@@ -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);