summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/recvfile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/lib/recvfile.c b/source3/lib/recvfile.c
index 7cbb8a0b92..5d1c0b2c55 100644
--- a/source3/lib/recvfile.c
+++ b/source3/lib/recvfile.c
@@ -214,10 +214,9 @@ ssize_t sys_recvfile(int fromfd,
}
done:
- if (total_written < count) {
+ if (count) {
int saved_errno = errno;
- if (drain_socket(fromfd, count-total_written) !=
- count-total_written) {
+ if (drain_socket(fromfd, count) != count) {
/* socket is dead. */
return -1;
}