Write out the right compat_flags value into the batch file.
authorWayne Davison <wayned@samba.org>
Sat, 26 Jun 2010 23:14:15 +0000 (16:14 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 26 Jun 2010 23:14:15 +0000 (16:14 -0700)
compat.c
io.c

index c2b475ba6384cd79deb53a381084f19aae20624c..3a4b38e218a754c902b182e316c9bd3d89d7ef04 100644 (file)
--- a/compat.c
+++ b/compat.c
@@ -24,6 +24,7 @@
 int remote_protocol = 0;
 int file_extra_cnt = 0; /* count of file-list extras that everyone gets */
 int inc_recurse = 0;
+int compat_flags = 0;
 int use_safe_inc_flist = 0;
 
 extern int verbose;
@@ -248,7 +249,6 @@ void setup_protocol(int f_out,int f_in)
                        exit_cleanup(RERR_PROTOCOL);
                }
        } else if (protocol_version >= 30) {
-               int compat_flags;
                if (am_server) {
                        compat_flags = allow_inc_recurse ? CF_INC_RECURSE : 0;
 #if defined HAVE_LUTIMES && defined HAVE_UTIMES
diff --git a/io.c b/io.c
index f9fa7c793114fbc4d1084ee4bb7da46b8213817c..6599e5a98da15ae6180b060bda8205a05f131ba2 100644 (file)
--- a/io.c
+++ b/io.c
@@ -48,6 +48,7 @@ extern int flist_eof;
 extern int list_only;
 extern int read_batch;
 extern int csum_length;
+extern int compat_flags;
 extern int protect_args;
 extern int checksum_seed;
 extern int protocol_version;
@@ -1901,7 +1902,7 @@ void start_write_batch(int fd)
         * is involved. */
        write_int(batch_fd, protocol_version);
        if (protocol_version >= 30)
-               write_byte(batch_fd, inc_recurse);
+               write_byte(batch_fd, compat_flags);
        write_int(batch_fd, checksum_seed);
 
        if (am_sender)