Third part of fix for bug #8679 - recvfile code path using splice() on Linux leaves...
commitb5238513a375c9a09d66cee4b6a72f4d29af6ce6
authorJeremy Allison <jra@samba.org>
Sat, 31 Dec 2011 04:45:10 +0000 (30 20:45 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 5 Mar 2012 19:54:47 +0000 (5 20:54 +0100)
treefcd18fd95107ee747fa506695bc01910c51b1100
parent87dd891a0d4fd7101b47f6f6aa310b4787acf39f
Third part of fix for bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write.

Fix default_sys_recvfile() to correctly cope with
short writes. Return the amount written. Return
-1 and set errno if no data could be written.
(cherry picked from commit 5e6263960aaf1a5f9993cb7bb5646d36ff92b9cc)
(cherry picked from commit ec9b07e84e806705e22f0cf2eb527fed14efac55)
(cherry picked from commit b0bc8bec29bce808253adf2a95b7fdb7d36a176f)
source3/lib/recvfile.c