Commit 0e74b5db authored by Christian Beier's avatar Christian Beier

IPv6 support for LibVNCServer, part onepointsix: fix a small logic error.

Without this, we would have gotten a stale IPv4 socket in a race
condition.
parent 23413bf1
...@@ -593,7 +593,7 @@ listenerRun(void *data) ...@@ -593,7 +593,7 @@ listenerRun(void *data)
len = sizeof (peer); len = sizeof (peer);
if (FD_ISSET(screen->listenSock, &listen_fds)) if (FD_ISSET(screen->listenSock, &listen_fds))
client_fd = accept(screen->listenSock, (struct sockaddr*)&peer, &len); client_fd = accept(screen->listenSock, (struct sockaddr*)&peer, &len);
if (FD_ISSET(screen->listen6Sock, &listen_fds)) else if (FD_ISSET(screen->listen6Sock, &listen_fds))
client_fd = accept(screen->listen6Sock, (struct sockaddr*)&peer, &len); client_fd = accept(screen->listen6Sock, (struct sockaddr*)&peer, &len);
if(client_fd >= 0) if(client_fd >= 0)
......
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