X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/da9d12f5d93724cb07a4107aa7aff92be9fb2ddb..d6631cf3a5287c66b61691557305c486dcb74cae:/sender.c?ds=sidebyside diff --git a/sender.c b/sender.c index b7ebbe1f..da51cb4c 100644 --- a/sender.c +++ b/sender.c @@ -25,6 +25,8 @@ extern struct stats stats; extern int io_error; extern int dry_run; extern int am_server; +extern int am_daemon; +extern int protocol_version; /** @@ -34,12 +36,8 @@ 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; - sum->count = read_int(f); sum->blength = read_int(f); if (protocol_version < 27) { @@ -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; @@ -193,14 +192,17 @@ void send_files(struct file_list *flist, int f_out, int f_in) } if (write_batch) - write_batch_csum_info(&i, flist->count, s); + write_batch_csum_info(&i, s); if (!read_batch) { fd = do_open(fname, O_RDONLY, 0); if (fd == -1) { if (errno == ENOENT) { + enum logcode c = am_daemon + && protocol_version < 28 ? FERROR + : FINFO; io_error |= IOERR_VANISHED; - rprintf(FINFO, "file has vanished: %s\n", + rprintf(c, "file has vanished: %s\n", full_fname(fname)); } else { io_error |= IOERR_GENERAL;