svn commit: samba r19101 - in branches/SAMBA_3_0/source/lib: .
metze at samba.org
metze at samba.org
Thu Oct 5 12:34:00 GMT 2006
Author: metze
Date: 2006-10-05 12:33:59 +0000 (Thu, 05 Oct 2006)
New Revision: 19101
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19101
Log:
add sys_recv() wrapper
metze
Modified:
branches/SAMBA_3_0/source/lib/system.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/system.c
===================================================================
--- branches/SAMBA_3_0/source/lib/system.c 2006-10-05 11:52:23 UTC (rev 19100)
+++ branches/SAMBA_3_0/source/lib/system.c 2006-10-05 12:33:59 UTC (rev 19101)
@@ -105,7 +105,6 @@
return ret;
}
-
/*******************************************************************
A pread wrapper that will deal with EINTR and 64-bit file offsets.
********************************************************************/
@@ -175,6 +174,20 @@
}
/*******************************************************************
+A write wrapper that will deal with EINTR.
+********************************************************************/
+
+ssize_t sys_recv(int fd, void *buf, size_t count, int flags)
+{
+ ssize_t ret;
+
+ do {
+ ret = recv(fd, buf, count, flags);
+ } while (ret == -1 && errno == EINTR);
+ return ret;
+}
+
+/*******************************************************************
A recvfrom wrapper that will deal with EINTR.
********************************************************************/
More information about the samba-cvs
mailing list