summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-03-15 19:19:38 +0000
committerWayne Davison <wayned@samba.org>2005-03-15 19:19:38 +0000
commit62f9573fb3ad52b0359fdf705e55d42677b7f9ed (patch)
tree7ed3f4c7ff6e6858a856a5599b5dfa292f7c6838
parent6d0e5d2e6254a3b012acfc724fc1aaf98defd7a6 (diff)
downloadrsync-62f9573fb3ad52b0359fdf705e55d42677b7f9ed.tar.gz
rsync-62f9573fb3ad52b0359fdf705e55d42677b7f9ed.tar.bz2
rsync-62f9573fb3ad52b0359fdf705e55d42677b7f9ed.zip
- Added an extra phase to the end of the transfer to better handle
delayed updates that have hard links. - Send the new ITEM_DUMMY_BIT to the sender so that we can figure out if the other side is pre1 or pre2 and let the receiver reject it.
-rw-r--r--generator.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/generator.c b/generator.c
index 7727e1f3..9a27c138 100644
--- a/generator.c
+++ b/generator.c
@@ -337,6 +337,8 @@ 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 & (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);
@@ -1239,9 +1241,8 @@ void generate_files(int f_out, struct file_list *flist, char *local_name)
continue;
if (!need_retouch_dir_times && file->mode & S_IWUSR)
continue;
- recv_generator(local_name ? local_name : f_name(file),
- file, i, itemizing, maybe_PERMS_REPORT,
- code, -1);
+ recv_generator(f_name(file), file, i, itemizing,
+ maybe_PERMS_REPORT, code, -1);
if (allowed_lull && !(j++ % lull_mod))
maybe_send_keepalive();
}
@@ -1255,6 +1256,12 @@ void generate_files(int f_out, struct file_list *flist, char *local_name)
io_error |= IOERR_DEL_LIMIT;
}
+ if (protocol_version >= 29) {
+ write_int(f_out, -1);
+ /* Read post-delay-phase MSG_DONE and any prior messages. */
+ get_redo_num(itemizing, code);
+ }
+
if (verbose > 2)
rprintf(FINFO,"generate_files finished\n");
}