--- sourceforge.net/trunk/rdesktop/tcp.c 2002/07/30 07:18:48 82 +++ sourceforge.net/trunk/rdesktop/tcp.c 2003/01/30 11:57:10 303 @@ -1,7 +1,7 @@ /* rdesktop: A Remote Desktop Protocol client. Protocol services - TCP layer - Copyright (C) Matthew Chapman 1999-2001 + Copyright (C) Matthew Chapman 1999-2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -84,7 +84,9 @@ while (length > 0) { - ui_select(sock); + if (!ui_select(sock)) + /* User quit */ + return NULL; rcvd = recv(sock, in.end, length, 0); if (rcvd == -1) @@ -112,7 +114,7 @@ { memcpy(&servaddr.sin_addr, nslookup->h_addr, sizeof(servaddr.sin_addr)); } - else if (!(servaddr.sin_addr.s_addr = inet_addr(server))) + else if ((servaddr.sin_addr.s_addr = inet_addr(server)) == INADDR_NONE) { error("%s: unable to resolve host\n", server); return False; @@ -147,7 +149,7 @@ /* Disconnect on the TCP layer */ void -tcp_disconnect() +tcp_disconnect(void) { close(sock); }