diff options
author | Wayne Davison <wayned@samba.org> | 2007-10-16 04:08:18 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2007-10-16 04:08:18 +0000 |
commit | dbd697b5780f8ec2f5e8615799ed0be921694f32 (patch) | |
tree | 2c6ed61bd982e2e25f4bcb5078fd6ea2867f4da2 /compat.c | |
parent | 5ca70927bea19aff939445bf78ed4d871bb04f7c (diff) | |
download | android_external_rsync-dbd697b5780f8ec2f5e8615799ed0be921694f32.tar.gz android_external_rsync-dbd697b5780f8ec2f5e8615799ed0be921694f32.tar.bz2 android_external_rsync-dbd697b5780f8ec2f5e8615799ed0be921694f32.zip |
- 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.
Diffstat (limited to 'compat.c')
-rw-r--r-- | compat.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; } |