Mercurial > pidgin
comparison src/win32/libc_interface.c @ 11543:8be7f4c472cf
[gaim-migrate @ 13798]
This was not right, if we didn't read any data from the socket because we'd already read it all, we were returning ENOTCONN. I wonder if there was a reason that we were doing this? The reason I noticed this was that libgg code relies on getting a 0 when all data has been read.
committer: Tailor Script <tailor@pidgin.im>
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Wed, 14 Sep 2005 04:38:02 +0000 |
| parents | d2e44c8085e0 |
| children | 40fada5b3d59 |
comparison
equal
deleted
inserted
replaced
| 11542:cda814bad7f8 | 11543:8be7f4c472cf |
|---|---|
| 278 if( wgaim_is_socket(fd) ) { | 278 if( wgaim_is_socket(fd) ) { |
| 279 if( (ret = recv(fd, buf, size, 0)) == SOCKET_ERROR ) { | 279 if( (ret = recv(fd, buf, size, 0)) == SOCKET_ERROR ) { |
| 280 errno = WSAGetLastError(); | 280 errno = WSAGetLastError(); |
| 281 return -1; | 281 return -1; |
| 282 } | 282 } |
| 283 #if 0 | |
| 283 else if( ret == 0 ) { | 284 else if( ret == 0 ) { |
| 284 /* connection has been gracefully closed */ | 285 /* connection has been gracefully closed */ |
| 285 errno = WSAENOTCONN; | 286 errno = WSAENOTCONN; |
| 286 return -1; | 287 return -1; |
| 287 } | 288 } |
| 289 #endif | |
| 288 else { | 290 else { |
| 289 /* success reading socket */ | 291 /* success reading socket */ |
| 290 return ret; | 292 return ret; |
| 291 } | 293 } |
| 292 } | 294 } |
