Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
If --delay-updates wasn't specified, write out two -1 indexes at
[rsync/rsync.git]
/
generator.c
diff --git
a/generator.c
b/generator.c
index
6d239ba
..
b9197c7
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-48,6
+48,7
@@
extern int delete_after;
extern int module_id;
extern int ignore_errors;
extern int remove_sent_files;
extern int module_id;
extern int ignore_errors;
extern int remove_sent_files;
+extern int delay_updates;
extern int update_only;
extern int opt_ignore_existing;
extern int inplace;
extern int update_only;
extern int opt_ignore_existing;
extern int inplace;
@@
-337,8
+338,6
@@
void itemize(struct file_struct *file, int ndx, int statret, STRUCT_STAT *st,
if ((iflags & SIGNIFICANT_ITEM_FLAGS || verbose > 1
|| (xname && *xname)) && !read_batch) {
if (protocol_version >= 29) {
if ((iflags & SIGNIFICANT_ITEM_FLAGS || verbose > 1
|| (xname && *xname)) && !read_batch) {
if (protocol_version >= 29) {
- if (iflags & (ITEM_LOCAL_CHANGE|ITEM_TRANSFER))/* XXX */
- iflags |= ITEM_DUMMY_BIT; /* XXX Remove soon */
if (ndx >= 0)
write_int(sock_f_out, ndx);
write_shortint(sock_f_out, iflags);
if (ndx >= 0)
write_int(sock_f_out, ndx);
write_shortint(sock_f_out, iflags);
@@
-1222,6
+1221,9
@@
void generate_files(int f_out, struct file_list *flist, char *local_name)
rprintf(FINFO,"generate_files phase=%d\n",phase);
write_int(f_out, -1);
rprintf(FINFO,"generate_files phase=%d\n",phase);
write_int(f_out, -1);
+ /* Reduce round-trip lag-time for a useless delay-updates phase. */
+ if (protocol_version >= 29 && !delay_updates)
+ write_int(f_out, -1);
/* Read MSG_DONE for the redo phase (and any prior messages). */
get_redo_num(itemizing, code);
/* Read MSG_DONE for the redo phase (and any prior messages). */
get_redo_num(itemizing, code);
@@
-1230,8
+1232,9
@@
void generate_files(int f_out, struct file_list *flist, char *local_name)
phase++;
if (verbose > 2)
rprintf(FINFO, "generate_files phase=%d\n", phase);
phase++;
if (verbose > 2)
rprintf(FINFO, "generate_files phase=%d\n", phase);
- write_int(f_out, -1);
- /* Read MSG_DONE for delay-update phase & prior messages. */
+ if (delay_updates)
+ write_int(f_out, -1);
+ /* Read MSG_DONE for delay-updates phase & prior messages. */
get_redo_num(itemizing, code);
}
get_redo_num(itemizing, code);
}