1 |
/* |
/* |
2 |
rdesktop: A Remote Desktop Protocol client. |
rdesktop: A Remote Desktop Protocol client. |
3 |
Protocol services - TCP layer |
Protocol services - TCP layer |
4 |
Copyright (C) Matthew Chapman 1999-2001 |
Copyright (C) Matthew Chapman 1999-2002 |
5 |
|
|
6 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
7 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
84 |
|
|
85 |
while (length > 0) |
while (length > 0) |
86 |
{ |
{ |
87 |
ui_select(sock); |
if (!ui_select(sock)) |
88 |
|
/* User quit */ |
89 |
|
return NULL; |
90 |
|
|
91 |
rcvd = recv(sock, in.end, length, 0); |
rcvd = recv(sock, in.end, length, 0); |
92 |
if (rcvd == -1) |
if (rcvd == -1) |
114 |
{ |
{ |
115 |
memcpy(&servaddr.sin_addr, nslookup->h_addr, sizeof(servaddr.sin_addr)); |
memcpy(&servaddr.sin_addr, nslookup->h_addr, sizeof(servaddr.sin_addr)); |
116 |
} |
} |
117 |
else if (!(servaddr.sin_addr.s_addr = inet_addr(server))) |
else if ((servaddr.sin_addr.s_addr = inet_addr(server)) == INADDR_NONE) |
118 |
{ |
{ |
119 |
error("%s: unable to resolve host\n", server); |
error("%s: unable to resolve host\n", server); |
120 |
return False; |
return False; |