Commit 584542ba authored by Oliver Loch's avatar Oliver Loch Committed by Christian Beier

Patched sockets.c to allow the use of IPv6 without IPv4.

As requested only those lines are indented that have been changed.
parent 54f50c5e
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment