Accept the new keep-alive (no-op) packet.
[rsync.git] / receiver.c
index 1779d175d66d3e228789d2ebe57b2a36b8f69162..fd75e8e95a70e58cc5604faa81fa56044539dc91 100644 (file)
@@ -426,6 +426,10 @@ int recv_files(int f_in, struct file_list *flist, char *local_name,
                }
 
                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)
+                               continue;
                        rprintf(FERROR,"Invalid file index %d in recv_files (count=%d)\n",
                                i, flist->count);
                        exit_cleanup(RERR_PROTOCOL);