diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index d978eee9d..5eaa039bd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2009-09-29 Corinna Vinschen + + * fhandler_socket.cc (fhandler_socket::recv_internal): Always call + WSARecv on SOCK_STREAM sockets. + 2009-09-28 Corinna Vinschen * fhandler.h (class dev_console): Constify charset parameter of diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 3e218347d..30253f9e5 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -1397,7 +1397,7 @@ fhandler_socket::recv_internal (LPWSAMSG wsamsg) This also covers another weird case: Winsock returns WSAEFAULT if namelen is a valid pointer while name is NULL. Both parameters are 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, NULL, NULL); else