1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-13 08:23:49 +03:00

r2622: to implement the SOCKET_FLAG_BLOCK option in the socket library we

need to add MSG_WAITALL to the recv() flags. This is needed by the
current server code or sometimes it will fail with a receive error.
This commit is contained in:
Andrew Tridgell
2004-09-25 11:16:30 +00:00
committed by Gerald (Jerry) Carter
parent e73b4ae4e5
commit 4cb11fb77a

View File

@@ -204,6 +204,10 @@ static NTSTATUS ipv4_tcp_recv(struct socket_context *sock, TALLOC_CTX *mem_ctx,
flgs |= MSG_DONTWAIT;
}
if (flags & SOCKET_FLAG_BLOCK) {
flgs |= MSG_WAITALL;
}
gotlen = recv(sock->fd, buf, wantlen, flgs);
if (gotlen == 0) {
talloc_free(buf);