- Moved the second send_extr_file_list() call to a better spot.
authorWayne Davison <wayned@samba.org>
Fri, 16 Feb 2007 02:47:12 +0000 (02:47 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 16 Feb 2007 02:47:12 +0000 (02:47 +0000)
- Moved the FILECNT_LOOKAHEAD define into rsync.h.

rsync.c
rsync.h
sender.c

diff --git a/rsync.c b/rsync.c
index f103e3cdb663c7e4ac8a8ef6fd74f31b61da9896..789aa61d04e90ee43e8f96f98b4d874ce4004f49 100644 (file)
--- a/rsync.c
+++ b/rsync.c
@@ -182,6 +182,8 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr,
                        exit_cleanup(RERR_PROTOCOL);
                }
        } else if (f_out >= 0) {
+               if (inc_recurse)
+                       send_extra_file_list(f_out, FILECNT_LOOKAHEAD);
                write_ndx_and_attrs(f_out, ndx, iflags,
                                    fnamecmp_type, buf, len);
        }
diff --git a/rsync.h b/rsync.h
index 0fcc7972544a6eaeed386ac11485bbc1b7b3f2f2..a6d513773c4ac2b15435cdae96c28c8258aafe21 100644 (file)
--- a/rsync.h
+++ b/rsync.h
 #define OLD_PROTOCOL_VERSION 25
 #define MAX_PROTOCOL_VERSION 40
 
+#define FILECNT_LOOKAHEAD 1000
+
 #define RSYNC_PORT 873
 
 #define SPARSE_WRITE_SIZE (1024)
index cab7e23514d7810461ab6b25e3089b5ace97325a..1c81ec1dc03453d7e1faa4c317ba9ac671193c06 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -44,8 +44,6 @@ extern int write_batch;
 extern struct stats stats;
 extern struct file_list *cur_flist, *first_flist;
 
-#define FILECNT_LOOKAHEAD 1000
-
 /**
  * @file
  *
@@ -203,9 +201,6 @@ void send_files(int f_in, int f_out)
                        continue;
                }
 
-               if (inc_recurse)
-                       send_extra_file_list(f_out, FILECNT_LOOKAHEAD);
-
                file = cur_flist->files[ndx - cur_flist->ndx_start];
                if (F_ROOTDIR(file)) {
                        path = F_ROOTDIR(file);