mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +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 used to be commit 4cb11fb77acf74ab53bf5782a114151965c558f0)
This commit is contained in:
parent
30381686c4
commit
5abd7f8f5f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user