diff options
author | Jeremy Allison <jra@samba.org> | 2002-04-19 02:20:04 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-04-19 02:20:04 +0000 |
commit | e762f93821a21f460fecf7452d2363574ab04dad (patch) | |
tree | 3981a18546538f3a8bc2cd899c0b222b8c2e7cb7 /source3/lib | |
parent | 87fc82801285a83b6e2e0faf85ca0984e939b088 (diff) | |
download | samba-e762f93821a21f460fecf7452d2363574ab04dad.tar.gz samba-e762f93821a21f460fecf7452d2363574ab04dad.tar.bz2 samba-e762f93821a21f460fecf7452d2363574ab04dad.zip |
Fixed sendto in oplock code.
Jeremy.
(This used to be commit 64974fa334fd757ff5cfd1bd32d7300bf8a6208c)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/system.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c index 61f93dd6a5..7734328795 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -118,6 +118,21 @@ ssize_t sys_send(int s, const void *msg, size_t len, int flags) } /******************************************************************* +A sendto wrapper that will deal with EINTR. +********************************************************************/ + +ssize_t sys_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) +{ + ssize_t ret; + + do { + errno = 0; + ret = sendto(s, msg, len, flags, to, tolen); + } while (ret == -1 && errno == EINTR); + return ret; +} + +/******************************************************************* A recvfrom wrapper that will deal with EINTR. ********************************************************************/ |