mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-08 18:19:08 +08:00
Cygwin: AF_INET and AF_LOCAL: recv_internal: fix MSG_WAITALL support
If MSG_WAITALL is set, recv_internal calls WSARecv or WSARecvFrom in a loop, in an effort to fill all the scatter-gather buffers. The test for whether all the buffers are full was previously incorrect.
This commit is contained in:
parent
324faf1e07
commit
6940081505
@ -1208,7 +1208,7 @@ fhandler_socket_inet::recv_internal (LPWSAMSG wsamsg, bool use_recvmsg)
|
||||
--wsacnt;
|
||||
}
|
||||
}
|
||||
if (!wret)
|
||||
if (!wsacnt)
|
||||
break;
|
||||
}
|
||||
else if (WSAGetLastError () != WSAEWOULDBLOCK)
|
||||
|
@ -1212,7 +1212,7 @@ fhandler_socket_local::recv_internal (LPWSAMSG wsamsg, bool use_recvmsg)
|
||||
--wsacnt;
|
||||
}
|
||||
}
|
||||
if (!wret)
|
||||
if (!wsacnt)
|
||||
break;
|
||||
}
|
||||
else if (WSAGetLastError () != WSAEWOULDBLOCK)
|
||||
|
Loading…
x
Reference in New Issue
Block a user