summaryrefslogtreecommitdiffstats
path: root/libvncserver
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2009-11-05 16:25:30 +0100
committerJohannes Schindelin <johannes.schindelin@gmx.de>2009-11-11 17:14:10 +0100
commit9ed410668c19ddd6b2c12709d6a5383e7f7a6e07 (patch)
treec58c13c3f035bd95c0b958388e2c8b337c19b0f3 /libvncserver
parentd4c43c1b7316fdaa03e4e1b14ef21f502a1c8be9 (diff)
downloadlibtdevnc-9ed410668c19ddd6b2c12709d6a5383e7f7a6e07.tar.gz
libtdevnc-9ed410668c19ddd6b2c12709d6a5383e7f7a6e07.zip
Fix checks for socket values, 0 is a legal value.
To make this work, we also have to initialize sockets to a default value of -1. Also close a client listen socket if it's open. Signed-off-by: Christian Beier <dontmind@freeshell.org> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'libvncserver')
-rw-r--r--libvncserver/rfbserver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c
index bb9c665..465d767 100644
--- a/libvncserver/rfbserver.c
+++ b/libvncserver/rfbserver.c
@@ -485,7 +485,7 @@ rfbClientConnectionGone(rfbClientPtr cl)
if (cl->next)
cl->next->prev = cl->prev;
- if(cl->sock>0)
+ if(cl->sock>=0)
close(cl->sock);
if (cl->scaledScreen!=NULL)