diff options
author | Christian Beier <dontmind@freeshell.org> | 2012-02-27 15:10:57 +0100 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2012-02-27 15:10:57 +0100 |
commit | 0e74b5db9af7a19ce4fee4bc166040cb3a50108e (patch) | |
tree | df9123e830727f4b2946de4883aa042f3de79959 /libvncserver | |
parent | 23413bf1200ce2fb3f5325a0292cbca7a4609e26 (diff) | |
download | libtdevnc-0e74b5db9af7a19ce4fee4bc166040cb3a50108e.tar.gz libtdevnc-0e74b5db9af7a19ce4fee4bc166040cb3a50108e.zip |
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.
Diffstat (limited to 'libvncserver')
-rw-r--r-- | libvncserver/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libvncserver/main.c b/libvncserver/main.c index 7ecc842..a045d4c 100644 --- a/libvncserver/main.c +++ b/libvncserver/main.c @@ -593,7 +593,7 @@ listenerRun(void *data) len = sizeof (peer); if (FD_ISSET(screen->listenSock, &listen_fds)) 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); if(client_fd >= 0) |