diff options
author | Oliver Loch <o.loch@gmx.net> | 2012-08-08 22:09:13 +0200 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2012-08-19 15:09:29 +0200 |
commit | 584542ba97d35706a9e5c001b5cdf64296b5dd7f (patch) | |
tree | b3baeaf2782e372a240cd5fab1b2260db4885192 /libvncserver | |
parent | 54f50c5e1db22e9087e70d14098c8aed658c6016 (diff) | |
download | libtdevnc-584542ba97d35706a9e5c001b5cdf64296b5dd7f.tar.gz libtdevnc-584542ba97d35706a9e5c001b5cdf64296b5dd7f.zip |
Patched sockets.c to allow the use of IPv6 without IPv4.
As requested only those lines are indented that have been changed.
Diffstat (limited to 'libvncserver')
-rw-r--r-- | libvncserver/sockets.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c index 3ff2aac..15b40ac 100644 --- a/libvncserver/sockets.c +++ b/libvncserver/sockets.c @@ -176,7 +176,9 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen) rfbScreen->maxFd = max((int)rfbScreen->listen6Sock,rfbScreen->maxFd); #endif } - else if(rfbScreen->port>0) { + else + { + if(rfbScreen->port>0) { FD_ZERO(&(rfbScreen->allFds)); if ((rfbScreen->listenSock = rfbListenOnTCPPort(rfbScreen->port, iface)) < 0) { @@ -187,8 +189,10 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen) FD_SET(rfbScreen->listenSock, &(rfbScreen->allFds)); rfbScreen->maxFd = rfbScreen->listenSock; + } #ifdef LIBVNCSERVER_IPv6 + if (rfbScreen->ipv6port>0) { if ((rfbScreen->listen6Sock = rfbListenOnTCP6Port(rfbScreen->ipv6port, rfbScreen->listen6Interface)) < 0) { /* ListenOnTCP6Port has its own detailed error printout */ return; @@ -197,6 +201,7 @@ rfbInitSockets(rfbScreenInfoPtr rfbScreen) FD_SET(rfbScreen->listen6Sock, &(rfbScreen->allFds)); rfbScreen->maxFd = max((int)rfbScreen->listen6Sock,rfbScreen->maxFd); + } #endif } |