summaryrefslogtreecommitdiffstats
path: root/win/winvnc
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-03-17 13:39:39 +0100
committerPierre Ossman <ossman@cendio.se>2015-03-17 17:18:50 +0100
commit57cab51d83629ee7e0ede8eaa869453cc9231434 (patch)
treea829392a6cf8003778fce30ecfca2570954d91ca /win/winvnc
parent9d78440b8354ae81f3fc094569f710c27f3ad0e6 (diff)
downloadtigervnc-57cab51d83629ee7e0ede8eaa869453cc9231434.tar.gz
tigervnc-57cab51d83629ee7e0ede8eaa869453cc9231434.zip
Resurrect TcpListener::getMyAddresses()
It is needed by WinVNC, but got removed in 892d10a70. Also fix a couple of issues: - Use getnameinfo() in order to be compatible with Windows XP - Make it static since it doesn't use a specific socket - Respect UseIPv4 and UseIPv6 - Flags for getaddrinfo() that match binding code - Dummy service value for Windows compatibility
Diffstat (limited to 'win/winvnc')
-rw-r--r--win/winvnc/VNCServerWin32.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/win/winvnc/VNCServerWin32.cxx b/win/winvnc/VNCServerWin32.cxx
index 36dbcee1..03899856 100644
--- a/win/winvnc/VNCServerWin32.cxx
+++ b/win/winvnc/VNCServerWin32.cxx
@@ -101,8 +101,8 @@ void VNCServerWin32::processAddressChange(network::SocketListener* sock_) {
// Fetch the list of addresses
std::list<char*> addrs;
- if (rfbSock.sock)
- rfbSock.sock->getMyAddresses(&addrs);
+ if (rfbSock.isListening())
+ TcpListener::getMyAddresses(&addrs);
else
addrs.push_front(strDup("Not accepting connections"));