]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Set stats.current_file_index.
authorWayne Davison <wayned@samba.org>
Tue, 13 Jan 2004 18:22:43 +0000 (18:22 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 13 Jan 2004 18:22:43 +0000 (18:22 +0000)
receiver.c
sender.c

index bc297cac271633f24f4b5874dbf07a20b32d06f1..e7fb21128ce5106e01c0dbdbb1facb1147afbb72 100644 (file)
@@ -309,7 +309,7 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
 
                i = read_int(f_in);
                if (i == -1) {
-                       if (phase==0) {
+                       if (phase == 0) {
                                phase++;
                                csum_length = SUM_LENGTH;
                                if (verbose > 2)
@@ -328,6 +328,7 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen)
 
                file = flist->files[i];
 
+               stats.current_file_index = i;
                stats.num_transferred_files++;
                stats.total_transferred_size += file->length;
                cleanup_got_literal = 0;
index b0c24ddbbf14518cf5a4838405cc68fc93132538..1d9a132b882e739b4ba662efc623353685d170fa 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -34,8 +34,6 @@ extern int am_server;
  * and transmits them to the receiver.  The sender process runs on the
  * machine holding the source files.
  **/
-
-
 void read_sum_head(int f, struct sum_struct *sum)
 {
        extern int protocol_version;
@@ -155,6 +153,7 @@ void send_files(struct file_list *flist, int f_out, int f_in)
 
                file = flist->files[i];
 
+               stats.current_file_index = i;
                stats.num_transferred_files++;
                stats.total_transferred_size += file->length;