X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/0e36d9da420af7c7e49bfd5e2c5aad712a85b633..e51094b7210fc31fa67cc218c1bd30de841a426e:/match.c diff --git a/match.c b/match.c index 7bf2cf4e..1eecf3c3 100644 --- a/match.c +++ b/match.c @@ -22,6 +22,7 @@ extern int verbose; extern int am_server; extern int do_progress; +extern int checksum_seed; typedef unsigned short tag; @@ -299,7 +300,7 @@ void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len) matches = 0; data_transfer = 0; - sum_init(); + sum_init(checksum_seed); if (len > 0 && s->count>0) { build_hash_table(s); @@ -322,6 +323,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");