aboutsummaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-05-13 06:46:20 +0000
committerWayne Davison <wayned@samba.org>2004-05-13 06:46:20 +0000
commitedecdad54de4c47609319d469ec41fbd36c0ab35 (patch)
treef7ecb016d86e77c379aef25cebffba5f1cbca98a /match.c
parent5291364f1d0e54a1a61fdc4f038d0420200b8971 (diff)
downloadandroid_external_rsync-edecdad54de4c47609319d469ec41fbd36c0ab35.tar.gz
android_external_rsync-edecdad54de4c47609319d469ec41fbd36c0ab35.tar.bz2
android_external_rsync-edecdad54de4c47609319d469ec41fbd36c0ab35.zip
If we got a read-error on a file, make sure that the whole-file
checksum we send to the receiver is wrong (so they won't save the bogus file).
Diffstat (limited to 'match.c')
-rw-r--r--match.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/match.c b/match.c
index 7bf2cf4e..6909fca3 100644
--- a/match.c
+++ b/match.c
@@ -322,6 +322,9 @@ void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len)
}
sum_end(file_sum);
+ /* If we had a read error, send a bad checksum. */
+ if (buf && buf->status != 0)
+ file_sum[0]++;
if (verbose > 2)
rprintf(FINFO,"sending file_sum\n");