From 3831f063198de700f35e8ff6aba944162527ada0 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 16 Feb 2007 02:47:12 +0000 Subject: [PATCH] - Moved the second send_extr_file_list() call to a better spot. - Moved the FILECNT_LOOKAHEAD define into rsync.h. --- rsync.c | 2 ++ rsync.h | 2 ++ sender.c | 5 ----- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/rsync.c b/rsync.c index f103e3cd..789aa61d 100644 --- 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 0fcc7972..a6d51377 100644 --- a/rsync.h +++ b/rsync.h @@ -104,6 +104,8 @@ #define OLD_PROTOCOL_VERSION 25 #define MAX_PROTOCOL_VERSION 40 +#define FILECNT_LOOKAHEAD 1000 + #define RSYNC_PORT 873 #define SPARSE_WRITE_SIZE (1024) diff --git a/sender.c b/sender.c index cab7e235..1c81ec1d 100644 --- 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); -- 2.34.1