summaryrefslogtreecommitdiff
path: root/sender.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-11-02 04:17:56 +0000
committerAndrew Tridgell <tridge@samba.org>1998-11-02 04:17:56 +0000
commit1b7c47cb550e7600a66528c9cbd4bc1e880fb91e (patch)
tree127347b185eb5cc12e085ba766c67ee4ff82e509 /sender.c
parent039faa86600172aa92362657659652671aedb4c8 (diff)
downloadrsync-1b7c47cb550e7600a66528c9cbd4bc1e880fb91e.tar.gz
Jason told me that's its very important for his site to log exactly
how many bytes were needed to be transferred for each file. I added %b and %c log format options to cover this. See the man page for details.
Diffstat (limited to 'sender.c')
-rw-r--r--sender.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sender.c b/sender.c
index bc30e4cb..79eb1c8c 100644
--- a/sender.c
+++ b/sender.c
@@ -91,6 +91,8 @@ void send_files(struct file_list *flist,int f_out,int f_in)
int i;
struct file_struct *file;
int phase = 0;
+ extern struct stats stats;
+ struct stats initial_stats;
if (verbose > 2)
rprintf(FINFO,"send_files starting\n");
@@ -149,6 +151,8 @@ void send_files(struct file_list *flist,int f_out,int f_in)
continue;
}
+ initial_stats = stats;
+
s = receive_sums(f_in);
if (!s) {
io_error = 1;
@@ -184,8 +188,6 @@ void send_files(struct file_list *flist,int f_out,int f_in)
rprintf(FINFO,"send_files mapped %s of size %d\n",
fname,(int)st.st_size);
- log_send(file);
-
write_int(f_out,i);
write_int(f_out,s->count);
@@ -200,7 +202,9 @@ void send_files(struct file_list *flist,int f_out,int f_in)
}
match_sums(f_out,s,buf,st.st_size);
-
+
+ log_send(file, &initial_stats);
+
if (buf) unmap_file(buf);
close(fd);