- 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 f103e3c..789aa61 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 0fcc797..a6d5137 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 cab7e23..1c81ec1 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);