mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-25 15:18:16 -04:00
Accept the new keep-alive (no-op) packet.
This commit is contained in:
1 parent
d17190df44
commit
8e6cf5d189
2 files changed
+11
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user