X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/a261989cda6f671352e6323f11d2d98e923c622e..bc63ae3f13e01874e375bb5cc606775889ed5afa:/sender.c diff --git a/sender.c b/sender.c index ca853ef5..93cf8716 100644 --- a/sender.c +++ b/sender.c @@ -20,7 +20,6 @@ #include "rsync.h" extern int verbose; -extern int remote_version; extern int csum_length; extern struct stats stats; extern int io_error; @@ -28,9 +27,18 @@ extern int dry_run; extern int am_server; -/* - receive the checksums for a buffer - */ +/** + * @file + * + * The sender gets checksums from the generator, calculates deltas, + * and transmits them to the receiver. The sender process runs on the + * machine holding the source files. + **/ + + +/** + * Receive the checksums for a buffer + **/ static struct sum_struct *receive_sums(int f) { struct sum_struct *s; @@ -46,8 +54,8 @@ static struct sum_struct *receive_sums(int f) s->sums = NULL; if (verbose > 3) - rprintf(FINFO,"count=%d n=%d rem=%d\n", - s->count,s->n,s->remainder); + rprintf(FINFO,"count=%ld n=%ld rem=%ld\n", + (long) s->count, (long) s->n, (long) s->remainder); if (s->count == 0) return(s); @@ -109,7 +117,7 @@ void send_files(struct file_list *flist,int f_out,int f_in) i = read_int(f_in); if (i == -1) { - if (phase==0 && remote_version >= 13) { + if (phase==0) { phase++; csum_length = SUM_LENGTH; write_int(f_out,-1); @@ -149,8 +157,8 @@ void send_files(struct file_list *flist,int f_out,int f_in) rprintf(FINFO,"send_files(%d,%s)\n",i,fname); if (dry_run) { - if (!am_server) { - log_transfer(file, fname+offset); + if (!am_server && verbose) { /* log transfer */ + rprintf(FINFO, "%s\n", fname+offset); } write_int(f_out,i); continue; @@ -211,8 +219,8 @@ void send_files(struct file_list *flist,int f_out,int f_in) if (!read_batch) rprintf(FINFO,"calling match_sums %s\n",fname); - if (!am_server) { - log_transfer(file, fname+offset); + if (!am_server && verbose) { /* log transfer */ + rprintf(FINFO, "%s\n", fname+offset); } set_compression(fname);