Moved the end_progress() call from match.c to sender.c so that we
authorWayne Davison <wayned@samba.org>
Sat, 5 Mar 2005 17:51:23 +0000 (17:51 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 5 Mar 2005 17:51:23 +0000 (17:51 +0000)
report progress on 0-length files when pushing files (the receiver
already called it, so we already produced progress on a 0-length
file when pulling).

match.c
sender.c

diff --git a/match.c b/match.c
index 89e5c52940c79aa97f0af9aa444397f32c3ee59b..00a38aa45abb8a310bc2d5157979d1358433e8a4 100644 (file)
--- a/match.c
+++ b/match.c
@@ -133,12 +133,8 @@ static void matched(int f, struct sum_struct *s, struct map_struct *buf,
        else
                last_match = offset;
 
-       if (buf && do_progress) {
+       if (buf && do_progress)
                show_progress(last_match, buf->file_size);
-
-               if (i == -1)
-                       end_progress(buf->file_size);
-       }
 }
 
 
index 4d8fe2cb906a92c2bdc001e623e15cfbc81a0a8e..399882251fa75400d02f4f241cfc323dcca45009 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -325,6 +325,9 @@ void send_files(struct file_list *flist, int f_out, int f_in)
                set_compression(fname);
 
                match_sums(f_out, s, mbuf, st.st_size);
+               if (do_progress)
+                       end_progress(st.st_size);
+
                if (!log_before_transfer)
                        log_item(file, &initial_stats, iflags, NULL);