Added a "chain" item to the struct sum_buf.
[rsync/rsync.git] / match.c
diff --git a/match.c b/match.c
index e42abca..eae3d14 100644 (file)
--- a/match.c
+++ b/match.c
@@ -20,7 +20,6 @@
 #include "rsync.h"
 
 extern int verbose;
-extern int am_server;
 extern int do_progress;
 extern int checksum_seed;
 extern int append_mode;
@@ -128,7 +127,6 @@ static void matched(int f, struct sum_struct *s, struct map_struct *buf,
                sum_update(map_ptr(buf, last_match + j, n1), n1);
        }
 
-
        if (i >= 0)
                last_match = offset + s->sums[i].len;
        else
@@ -334,12 +332,16 @@ void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len)
        if (append_mode) {
                OFF_T j = 0;
                for (j = CHUNK_SIZE; j < s->flength; j += CHUNK_SIZE) {
+                       if (buf && do_progress)
+                               show_progress(last_match, buf->file_size);
                        sum_update(map_ptr(buf, last_match, CHUNK_SIZE),
                                   CHUNK_SIZE);
                        last_match = j;
                }
                if (last_match < s->flength) {
                        int32 len = s->flength - last_match;
+                       if (buf && do_progress)
+                               show_progress(last_match, buf->file_size);
                        sum_update(map_ptr(buf, last_match, len), len);
                        last_match = s->flength;
                }