diff options
author | Wayne Davison <wayned@samba.org> | 2004-05-13 06:46:20 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2004-05-13 06:46:20 +0000 |
commit | edecdad54de4c47609319d469ec41fbd36c0ab35 (patch) | |
tree | f7ecb016d86e77c379aef25cebffba5f1cbca98a /match.c | |
parent | 5291364f1d0e54a1a61fdc4f038d0420200b8971 (diff) | |
download | android_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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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"); |