aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc/RFBGlue.cc
diff options
context:
space:
mode:
authorTim Waugh <twaugh@redhat.com>2015-03-11 13:12:07 +0000
committerTim Waugh <twaugh@redhat.com>2015-03-13 16:19:50 +0000
commit892d10a705077083489f0ed4861af123433ff811 (patch)
tree45a19cc088a7603eb51f1d9917efd087e0458eda /unix/xserver/hw/vnc/RFBGlue.cc
parenta85363daa80697bda35c789b9ffca53dc7c3c71b (diff)
downloadtigervnc-892d10a705077083489f0ed4861af123433ff811.tar.gz
tigervnc-892d10a705077083489f0ed4861af123433ff811.zip
Fixed IPv6 support.
The TcpListener constructor now takes a 'struct sockaddr*' instead of a string, and the createTcpListeners function creates TcpListener instances for an address based on the results from getaddrinfo(). The XserverDesktop class now takes a list of TcpListener instances for each of the RFB and HTTP sockets. The TcpListener::closeFd member variable is not used and has been removed.
Diffstat (limited to 'unix/xserver/hw/vnc/RFBGlue.cc')
-rw-r--r--unix/xserver/hw/vnc/RFBGlue.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/unix/xserver/hw/vnc/RFBGlue.cc b/unix/xserver/hw/vnc/RFBGlue.cc
index 53d5bdb0..19338fc7 100644
--- a/unix/xserver/hw/vnc/RFBGlue.cc
+++ b/unix/xserver/hw/vnc/RFBGlue.cc
@@ -187,7 +187,10 @@ int vncGetSocketPort(int fd)
int vncIsTCPPortUsed(int port)
{
try {
- network::TcpListener l(NULL, port);
+ // Attempt to create TCPListeners on that port.
+ // They go out of scope immediately and are destroyed.
+ std::list<network::TcpListener> dummy;
+ network::createTcpListeners (&dummy, 0, port);
} catch (rdr::Exception& e) {
return 0;
}