X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/4dde3347fb614270f6aa6812598185aa0ccca3ef..2b2a47383124f9b62834778f61d2ccb1e55f6a0d:/sender.c diff --git a/sender.c b/sender.c index 98612965..60820dd8 100644 --- a/sender.c +++ b/sender.c @@ -42,6 +42,8 @@ extern int make_backups; extern int inplace; extern int batch_fd; extern int write_batch; +extern int file_old_total; +extern BOOL we_send_keepalive_messages; extern struct stats stats; extern struct file_list *cur_flist, *first_flist, *dir_flist; @@ -103,8 +105,8 @@ static struct sum_struct *receive_sums(int f) s->sums[i].len = s->blength; offset += s->sums[i].len; - if (allowed_lull && !(i % lull_mod)) - maybe_send_keepalive(); + if (we_send_keepalive_messages && !(i % lull_mod)) + maybe_send_keepalive(time(NULL), True); if (DEBUG_GTE(DELTASUM, 3)) { rprintf(FINFO, @@ -197,8 +199,11 @@ void send_files(int f_in, int f_out) end_progress(0); } if (inc_recurse && first_flist) { + file_old_total -= first_flist->used; flist_free(first_flist); if (first_flist) { + if (first_flist == cur_flist) + file_old_total = cur_flist->used; write_ndx(f_out, NDX_DONE); continue; } @@ -333,7 +338,7 @@ void send_files(int f_in, int f_out) rsyserr(FERROR_XFER, errno, "fstat failed"); free_sums(s); close(fd); - exit_cleanup(RERR_PROTOCOL); + exit_cleanup(RERR_FILEIO); } if (st.st_size) {