From 1f6fd130a35e4068ac7caa164b89516319c3d276 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 27 Oct 2004 03:45:35 +0000 Subject: r3279: Removed MSG_DONTWAIT flags as many platform don't have it. If a socket is non-blocking then adding MSG_DONTWAIT is pointless (it does nothing), so all we lose is the ability to set non-blocking on a packet-by-packet basis, which is not a very useful thing to have anyway if the socket is blocking then the code already adds MSG_WAITALL, so MSG_DONTWAIT is also not needed in that case. (This used to be commit b8a2afae67691a609b4a7a577fee3f9518adc9d2) --- source4/lib/socket/socket_unix.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'source4/lib/socket/socket_unix.c') diff --git a/source4/lib/socket/socket_unix.c b/source4/lib/socket/socket_unix.c index 90802eae66..eda1597df7 100644 --- a/source4/lib/socket/socket_unix.c +++ b/source4/lib/socket/socket_unix.c @@ -172,10 +172,6 @@ static NTSTATUS unixdom_recv(struct socket_context *sock, TALLOC_CTX *mem_ctx, flgs |= MSG_PEEK; } - if (!(flags & SOCKET_FLAG_BLOCK)) { - flgs |= MSG_DONTWAIT; - } - if (flags & SOCKET_FLAG_BLOCK) { flgs |= MSG_WAITALL; } @@ -207,11 +203,6 @@ static NTSTATUS unixdom_send(struct socket_context *sock, TALLOC_CTX *mem_ctx, *sendlen = 0; - /* TODO: we need to map all flags here */ - if (!(flags & SOCKET_FLAG_BLOCK)) { - flgs |= MSG_DONTWAIT; - } - len = send(sock->fd, blob->data, blob->length, flgs); if (len == -1) { return unixdom_error(errno); -- cgit