svn commit: samba r2622 - in branches/SAMBA_4_0/source/lib/socket: .
tridge at samba.org
tridge at samba.org
Sat Sep 25 11:16:30 GMT 2004
Author: tridge
Date: 2004-09-25 11:16:30 +0000 (Sat, 25 Sep 2004)
New Revision: 2622
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/lib/socket&rev=2622&nolog=1
Log:
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.
Modified:
branches/SAMBA_4_0/source/lib/socket/socket_ipv4.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/socket/socket_ipv4.c
===================================================================
--- branches/SAMBA_4_0/source/lib/socket/socket_ipv4.c 2004-09-25 11:15:18 UTC (rev 2621)
+++ branches/SAMBA_4_0/source/lib/socket/socket_ipv4.c 2004-09-25 11:16:30 UTC (rev 2622)
@@ -204,6 +204,10 @@
flgs |= MSG_DONTWAIT;
}
+ if (flags & SOCKET_FLAG_BLOCK) {
+ flgs |= MSG_WAITALL;
+ }
+
gotlen = recv(sock->fd, buf, wantlen, flgs);
if (gotlen == 0) {
talloc_free(buf);
More information about the samba-cvs
mailing list