From 9ed410668c19ddd6b2c12709d6a5383e7f7a6e07 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Thu, 5 Nov 2009 16:25:30 +0100 Subject: 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 Signed-off-by: Johannes Schindelin --- libvncclient/rfbproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libvncclient/rfbproto.c') diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c index 57a3a54..76b501a 100644 --- a/libvncclient/rfbproto.c +++ b/libvncclient/rfbproto.c @@ -388,7 +388,7 @@ ConnectToRFBServer(rfbClient* client,const char *hostname, int port) fclose(rec->file); return FALSE; } - client->sock = 0; + client->sock = -1; return TRUE; } -- cgit v1.2.1