s3:smbd: let default_sys_recvfile() and sys_recvfile() cope with non-blocking sockets.
default_sys_recvfile() and splice() recvfile were not
written to cope with non-blocking sockets.
When either the socket read() or splice() return
-1 with errno EWOULDBLOCK or EAGAIN, if no bytes have been
processed yet, return -1 and let the caller set
blocking and retry. If bytes have been processed,
just return them as a short read and let the
caller retry with the remaining needed reads.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>