mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-01 12:35:44 +08:00
* fhandler_socket.cc (fhandler_socket::recv_internal): Set namelen
pointer to NULL if name pointer is NULL. Explain why.
This commit is contained in:
parent
2476ec9bdf
commit
792c564b27
@ -1,3 +1,8 @@
|
||||
2009-06-13 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_socket.cc (fhandler_socket::recv_internal): Set namelen
|
||||
pointer to NULL if name pointer is NULL. Explain why.
|
||||
|
||||
2009-06-12 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* localtime.cc (time2): Change "spring gap" to "spring forward gap"
|
||||
|
@ -1347,7 +1347,12 @@ fhandler_socket::recv_internal (LPWSAMSG wsamsg)
|
||||
res = WSARecvMsg (get_socket (), wsamsg, &wret, NULL, NULL);
|
||||
else
|
||||
res = WSARecvFrom (get_socket (), wsabuf, wsacnt, &wret,
|
||||
&wsamsg->dwFlags, wsamsg->name, &wsamsg->namelen,
|
||||
&wsamsg->dwFlags, wsamsg->name,
|
||||
/* 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. */
|
||||
wsamsg->name ? &wsamsg->namelen : NULL,
|
||||
NULL, NULL);
|
||||
if (!res)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user