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 /sender.c | |
parent | 44a97a34b151a3a4fc4fd4b1c0def483a428e633 (diff) | |
download | android_external_rsync-4dde3347fb614270f6aa6812598185aa0ccca3ef.tar.gz android_external_rsync-4dde3347fb614270f6aa6812598185aa0ccca3ef.tar.bz2 android_external_rsync-4dde3347fb614270f6aa6812598185aa0ccca3ef.zip |
Fix %b and %c so that they count per-transfer bytes again.
Diffstat (limited to 'sender.c')
-rw-r--r-- | sender.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -171,7 +171,6 @@ void send_files(int f_in, int f_out) int iflags, xlen; struct file_struct *file; int phase = 0, max_phase = protocol_version >= 29 ? 2 : 1; - 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 f_xfer = write_batch < 0 ? batch_fd : f_out; @@ -291,15 +290,16 @@ void send_files(int f_in, int f_out) stats.xferred_files++; stats.total_transferred_size += F_LENGTH(file); + 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); write_ndx_and_attrs(f_out, ndx, iflags, fname, file, fnamecmp_type, xname, xlen); continue; } - initial_stats = stats; - if (!(s = receive_sums(f_in))) { io_error |= IOERR_GENERAL; rprintf(FERROR_XFER, "receive_sums failed\n"); @@ -355,7 +355,7 @@ void send_files(int f_in, int f_out) rprintf(FINFO, "calling match_sums %s%s%s\n", path,slash,fname); 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(FCLIENT, "%s\n", fname); @@ -365,7 +365,7 @@ void send_files(int f_in, int f_out) if (INFO_GTE(PROGRESS, 1)) end_progress(st.st_size); - log_item(log_code, file, &initial_stats, iflags, NULL); + log_item(log_code, file, iflags, NULL); if (mbuf) { j = unmap_file(mbuf); |