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:
Ken Brown via Cygwin-patches 2020-10-12 14:02:13 -04:00 committed by Ken Brown
parent 0c3c451ae3
commit 3752ab804b
2 changed files with 2 additions and 2 deletions

View File

@ -1208,7 +1208,7 @@ fhandler_socket_inet::recv_internal (LPWSAMSG wsamsg, bool use_recvmsg)
--wsacnt; --wsacnt;
} }
} }
if (!wret) if (!wsacnt)
break; break;
} }
else if (WSAGetLastError () != WSAEWOULDBLOCK) else if (WSAGetLastError () != WSAEWOULDBLOCK)

View File

@ -1212,7 +1212,7 @@ fhandler_socket_local::recv_internal (LPWSAMSG wsamsg, bool use_recvmsg)
--wsacnt; --wsacnt;
} }
} }
if (!wret) if (!wsacnt)
break; break;
} }
else if (WSAGetLastError () != WSAEWOULDBLOCK) else if (WSAGetLastError () != WSAEWOULDBLOCK)