diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-27 03:45:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:04:49 -0500 |
commit | 1f6fd130a35e4068ac7caa164b89516319c3d276 (patch) | |
tree | b85b33c7b22e8873846859a503298465cdc2e709 /source4/lib/socket/socket_ipv4.c | |
parent | 9d055846f225bea4953822f40fab1d2f1a2e2d07 (diff) | |
download | samba-1f6fd130a35e4068ac7caa164b89516319c3d276.tar.gz samba-1f6fd130a35e4068ac7caa164b89516319c3d276.tar.bz2 samba-1f6fd130a35e4068ac7caa164b89516319c3d276.zip |
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)
Diffstat (limited to 'source4/lib/socket/socket_ipv4.c')
-rw-r--r-- | source4/lib/socket/socket_ipv4.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source4/lib/socket/socket_ipv4.c b/source4/lib/socket/socket_ipv4.c index 20dfd3c92f..3fda0fe9fb 100644 --- a/source4/lib/socket/socket_ipv4.c +++ b/source4/lib/socket/socket_ipv4.c @@ -183,10 +183,6 @@ static NTSTATUS ipv4_tcp_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; } @@ -227,16 +223,11 @@ static NTSTATUS ipv4_tcp_recv(struct socket_context *sock, TALLOC_CTX *mem_ctx, } static NTSTATUS ipv4_tcp_send(struct socket_context *sock, TALLOC_CTX *mem_ctx, - const DATA_BLOB *blob, size_t *sendlen, uint32_t flags) + const DATA_BLOB *blob, size_t *sendlen, uint32_t flags) { ssize_t len; int flgs = 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 map_nt_error_from_unix(errno); |