1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-21 20:23:50 +03:00

Fixed sendto in oplock code.

Jeremy.
This commit is contained in:
Jeremy Allison
-
parent 68c0eb5ca7
commit 64974fa334
2 changed files with 17 additions and 2 deletions

View File

@@ -117,6 +117,21 @@ ssize_t sys_send(int s, const void *msg, size_t len, int flags)
return ret;
}
/*******************************************************************
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.
********************************************************************/