summaryrefslogtreecommitdiff
path: root/source3/modules/onefs_system.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-03-20 16:40:09 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-03-20 16:40:09 +0100
commitca202cf464aec82e63be4b2160f394f56b8c195e (patch)
tree58b432b7d67c5cf3b35a16c7df9b028d39e3b3a5 /source3/modules/onefs_system.c
parent44787565715f0622cc1d049854427d735ca1c14b (diff)
parent2de464a7658f91d2d01087080b984d52c3483426 (diff)
downloadsamba-ca202cf464aec82e63be4b2160f394f56b8c195e.tar.gz
samba-ca202cf464aec82e63be4b2160f394f56b8c195e.tar.bz2
samba-ca202cf464aec82e63be4b2160f394f56b8c195e.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into displaysec
Diffstat (limited to 'source3/modules/onefs_system.c')
-rw-r--r--source3/modules/onefs_system.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c
index b8b059bce9..46f38265b1 100644
--- a/source3/modules/onefs_system.c
+++ b/source3/modules/onefs_system.c
@@ -591,8 +591,8 @@ ssize_t onefs_sys_recvfile(int fromfd, int tofd, SMB_OFF_T offset,
*/
while (total_rbytes < count) {
- DEBUG(0, ("shallow recvfile, reading %llu\n",
- count - total_rbytes));
+ DEBUG(0, ("shallow recvfile (%s), reading %llu\n",
+ strerror(errno), count - total_rbytes));
/*
* Read the remaining data into the spill buffer. recvfile
@@ -603,9 +603,13 @@ ssize_t onefs_sys_recvfile(int fromfd, int tofd, SMB_OFF_T offset,
spill_buffer + (total_rbytes - total_wbytes),
count - total_rbytes);
- if (ret == -1) {
- DEBUG(0, ("shallow recvfile read failed: %s\n",
- strerror(errno)));
+ if (ret <= 0) {
+ if (ret == 0) {
+ DEBUG(0, ("shallow recvfile read: EOF\n"));
+ } else {
+ DEBUG(0, ("shallow recvfile read failed: %s\n",
+ strerror(errno)));
+ }
/* Socket is dead, so treat as if it were drained. */
socket_drained = true;
goto out;