mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-05-24 06:45:27 -04:00
- Send a flag from the client to the server to indicate if the protocol
is going to run in inc_recurse mode or not. - Verify that the options we received (as a server or as a batch-reader) are compatible with the requested inc_recurse mode.
This commit is contained in:
11
compat.c
11
compat.c
@@ -220,6 +220,17 @@ void setup_protocol(int f_out,int f_in)
|
||||
&& !delete_before && !delete_after && !delay_updates
|
||||
&& !use_qsort && !prune_empty_dirs)
|
||||
inc_recurse = 1;
|
||||
if (am_server || read_batch) {
|
||||
int i_r = read_byte(f_in);
|
||||
if (i_r && !inc_recurse) {
|
||||
fprintf(stderr,
|
||||
"Incompatible options specified for inc-recursive %s.\n",
|
||||
read_batch ? "batch file" : "connection");
|
||||
exit_cleanup(RERR_SYNTAX);
|
||||
}
|
||||
inc_recurse = i_r;
|
||||
} else
|
||||
write_byte(f_out, inc_recurse);
|
||||
need_messages_from_generator = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user