diff options
author | Wayne Davison <wayned@samba.org> | 2009-10-25 22:22:03 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2009-10-25 22:27:01 -0700 |
commit | 4dde3347fb614270f6aa6812598185aa0ccca3ef (patch) | |
tree | e085cf016d2623e6914e190981b7c25f13c2f8e6 /receiver.c | |
parent | 44a97a34b151a3a4fc4fd4b1c0def483a428e633 (diff) | |
download | rsync-4dde3347fb614270f6aa6812598185aa0ccca3ef.tar.gz |
Fix %b and %c so that they count per-transfer bytes again.
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -467,7 +467,6 @@ int recv_files(int f_in, int f_out, char *local_name) char fnamecmpbuf[MAXPATHLEN]; uchar fnamecmp_type; struct file_struct *file; - struct stats initial_stats; int itemizing = am_server ? logfile_format_has_i : stdout_format_has_i; enum logcode log_code = log_before_transfer ? FLOG : FINFO; int max_phase = protocol_version >= 29 ? 2 : 1; @@ -612,14 +611,17 @@ int recv_files(int f_in, int f_out, char *local_name) } } + if (!log_before_transfer) + remember_initial_stats(); + if (!do_xfers) { /* log the transfer */ - log_item(FCLIENT, file, &stats, iflags, NULL); + log_item(FCLIENT, file, iflags, NULL); if (read_batch) discard_receive_data(f_in, F_LENGTH(file)); continue; } if (write_batch < 0) { - log_item(FCLIENT, file, &stats, iflags, NULL); + log_item(FCLIENT, file, iflags, NULL); if (!am_server) discard_receive_data(f_in, F_LENGTH(file)); continue; @@ -677,8 +679,6 @@ int recv_files(int f_in, int f_out, char *local_name) fnamecmp = fname; } - initial_stats = stats; - /* open the file */ fd1 = do_open(fnamecmp, O_RDONLY, 0); @@ -773,7 +773,7 @@ int recv_files(int f_in, int f_out, char *local_name) /* log the transfer */ if (log_before_transfer) - log_item(FCLIENT, file, &initial_stats, iflags, NULL); + log_item(FCLIENT, file, iflags, NULL); else if (!am_server && INFO_GTE(NAME, 1) && INFO_EQ(PROGRESS, 1)) rprintf(FINFO, "%s\n", fname); @@ -781,7 +781,7 @@ int recv_files(int f_in, int f_out, char *local_name) recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, fname, fd2, F_LENGTH(file)); - log_item(log_code, file, &initial_stats, iflags, NULL); + log_item(log_code, file, iflags, NULL); if (fd1 != -1) close(fd1); |