X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/340bd68f5932ef6087a5eaf099dd5db0e90ef646..32cbfe7b17ba8ec661fc27fd773909709d100e8a:/sender.c diff --git a/sender.c b/sender.c index e771a9e7..b745f6f7 100644 --- a/sender.c +++ b/sender.c @@ -167,6 +167,13 @@ void send_files(struct file_list *flist, int f_out, int f_in) } if (i < 0 || i >= flist->count) { + /* Handle the new keep-alive (no-op) packet. */ + if (i == flist->count && protocol_version >= 29 + && read_shortint(f_in) == ITEM_IS_NEW) { + write_int(f_out, i); + write_shortint(f_out, ITEM_IS_NEW); + continue; + } rprintf(FERROR, "Invalid file index %d (count=%d)\n", i, flist->count); exit_cleanup(RERR_PROTOCOL); @@ -204,7 +211,7 @@ void send_files(struct file_list *flist, int f_out, int f_in) iflags = ITEM_UPDATING | ITEM_MISSING_DATA; if (inplace && protocol_version >= 29) { - updating_basis_file = iflags & ITEM_USING_ALT_BASIS; + updating_basis_file = !(iflags & ITEM_USING_ALT_BASIS); } else updating_basis_file = inplace && !make_backups;