summaryrefslogtreecommitdiff
path: root/generator.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-07-21 23:59:25 +0000
committerWayne Davison <wayned@samba.org>2004-07-21 23:59:25 +0000
commit727b35f6659800b95d24d3955673f639298b655b (patch)
tree751e8c35f5e5527ca863ab76da96a55380ae7d9d /generator.c
parentaa4343211f67bf77c46845f9f327b8a7d850b161 (diff)
downloadrsync-727b35f6659800b95d24d3955673f639298b655b.tar.gz
In read_batch mode, we now let the code write out the index value
to the f_out pipe before we return from recv_generator(). This gives the receiver something to sync with so that it doesn't rush ahead of us (which could be bad if we didn't have a chance to create the destination dirs yet).
Diffstat (limited to 'generator.c')
-rw-r--r--generator.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/generator.c b/generator.c
index 899e744a..728bcb77 100644
--- a/generator.c
+++ b/generator.c
@@ -404,9 +404,6 @@ static void recv_generator(char *fname, struct file_struct *file, int i,
}
#endif
- if (read_batch)
- return;
-
if (preserve_hard_links && hard_link_check(file, HL_CHECK_MASTER))
return;
@@ -446,7 +443,7 @@ static void recv_generator(char *fname, struct file_struct *file, int i,
return;
if (errno == ENOENT) {
write_int(f_out,i);
- if (!dry_run)
+ if (!dry_run && !read_batch)
write_sum_head(f_out, NULL);
} else if (verbose > 1) {
rsyserr(FERROR, errno,
@@ -465,7 +462,7 @@ static void recv_generator(char *fname, struct file_struct *file, int i,
if (preserve_hard_links && hard_link_check(file, HL_SKIP))
return;
write_int(f_out,i);
- if (!dry_run)
+ if (!dry_run && !read_batch)
write_sum_head(f_out, NULL);
return;
}
@@ -489,7 +486,7 @@ static void recv_generator(char *fname, struct file_struct *file, int i,
return;
}
- if (dry_run) {
+ if (dry_run || read_batch) {
write_int(f_out,i);
return;
}