* fhandler_socket.cc (fhandler_socket::recv_internal): Always call

WSARecv on SOCK_STREAM sockets.
This commit is contained in:
Corinna Vinschen 2009-09-29 08:46:29 +00:00
parent c38ed7c697
commit 4abcdf2717
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-09-29 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::recv_internal): Always call
WSARecv on SOCK_STREAM sockets.
2009-09-28 Corinna Vinschen <corinna@vinschen.de> 2009-09-28 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (class dev_console): Constify charset parameter of * fhandler.h (class dev_console): Constify charset parameter of

View File

@ -1397,7 +1397,7 @@ fhandler_socket::recv_internal (LPWSAMSG wsamsg)
This also covers another weird case: Winsock returns WSAEFAULT if This also covers another weird case: Winsock returns WSAEFAULT if
namelen is a valid pointer while name is NULL. Both parameters are namelen is a valid pointer while name is NULL. Both parameters are
ignored for TCP sockets, so this only occurs when using UDP socket. */ ignored for TCP sockets, so this only occurs when using UDP socket. */
else if (!wsamsg->name) else if (!wsamsg->name || get_socket_type () == SOCK_STREAM)
res = WSARecv (get_socket (), wsabuf, wsacnt, &wret, &wsamsg->dwFlags, res = WSARecv (get_socket (), wsabuf, wsacnt, &wret, &wsamsg->dwFlags,
NULL, NULL); NULL, NULL);
else else