aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2009-10-17 09:09:27 -0700
committerWayne Davison <wayned@samba.org>2009-10-17 11:06:20 -0700
commit1ec57e4ddcea665d04e780041fb0d1d8885bfed3 (patch)
tree5a75d762d33fe9d3ca71dd00b198fd3203dba286 /io.c
parent20caffd2b361bcad51692998411e4cc566c04b40 (diff)
downloadandroid_external_rsync-1ec57e4ddcea665d04e780041fb0d1d8885bfed3.tar.gz
android_external_rsync-1ec57e4ddcea665d04e780041fb0d1d8885bfed3.tar.bz2
android_external_rsync-1ec57e4ddcea665d04e780041fb0d1d8885bfed3.zip
Fix check for an empty output buffer and limit to flist_eof.
Diffstat (limited to 'io.c')
-rw-r--r--io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io.c b/io.c
index 7c50d5af..610a802b 100644
--- a/io.c
+++ b/io.c
@@ -1197,7 +1197,8 @@ void io_end_buffering_out(BOOL free_buffers)
void maybe_flush_socket(int important)
{
- if (iobuf.out.buf && iobuf.out.len && (important || time(NULL) - last_io_out >= 5))
+ if (flist_eof && iobuf.out.buf && iobuf.out.len > iobuf.out_empty_len
+ && (important || time(NULL) - last_io_out >= 5))
io_flush(NORMAL_FLUSH);
}