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
Changed error message for incompatible 2.6.4 pre-release versions.
[rsync/rsync.git]
/
receiver.c
diff --git
a/receiver.c
b/receiver.c
index
d7c6f59
..
ff02e20
100644
(file)
--- a/
receiver.c
+++ b/
receiver.c
@@
-365,7
+365,8
@@
int recv_files(int f_in, struct file_list *flist, char *local_name)
int save_make_backups = make_backups;
int itemizing = am_daemon ? daemon_log_format_has_i
: !am_server && log_format_has_i;
int save_make_backups = make_backups;
int itemizing = am_daemon ? daemon_log_format_has_i
: !am_server && log_format_has_i;
- int i, recv_ok, phase = 0;
+ int phase = 0, max_phase = protocol_version >= 29 ? 2 : 1;
+ int i, recv_ok;
if (verbose > 2)
rprintf(FINFO,"recv_files(%d) starting\n",flist->count);
if (verbose > 2)
rprintf(FINFO,"recv_files(%d) starting\n",flist->count);
@@
-388,16
+389,13
@@
int recv_files(int f_in, struct file_list *flist, char *local_name)
while (read_int(batch_gen_fd) != -1) {}
next_gen_i = -1;
}
while (read_int(batch_gen_fd) != -1) {}
next_gen_i = -1;
}
- if (phase)
+ if (
++phase > max_
phase)
break;
break;
- phase = 1;
csum_length = SUM_LENGTH;
if (verbose > 2)
rprintf(FINFO, "recv_files phase=%d\n", phase);
csum_length = SUM_LENGTH;
if (verbose > 2)
rprintf(FINFO, "recv_files phase=%d\n", phase);
- if (
delay_updates) {
+ if (
phase == 2 && delay_updates)
handle_delayed_updates(flist, local_name);
handle_delayed_updates(flist, local_name);
- delay_updates = 0;
- }
send_msg(MSG_DONE, "", 0);
if (keep_partial && !partial_dir)
make_backups = 0; /* prevents double backup */
send_msg(MSG_DONE, "", 0);
if (keep_partial && !partial_dir)
make_backups = 0; /* prevents double backup */
@@
-419,6
+417,12
@@
int recv_files(int f_in, struct file_list *flist, char *local_name)
maybe_log_item(file, iflags, itemizing, xname);
continue;
}
maybe_log_item(file, iflags, itemizing, xname);
continue;
}
+ if (phase == 2) {
+ rprintf(FERROR,
+ "got transfer request in phase 2 [%s]\n",
+ who_am_i());
+ exit_cleanup(RERR_PROTOCOL);
+ }
stats.current_file_index = i;
stats.num_transferred_files++;
stats.current_file_index = i;
stats.num_transferred_files++;
@@
-680,6
+684,8
@@
int recv_files(int f_in, struct file_list *flist, char *local_name)
}
make_backups = save_make_backups;
}
make_backups = save_make_backups;
+ if (phase == 2 && delay_updates) /* for protocol_version < 29 */
+ handle_delayed_updates(flist, local_name);
if (verbose > 2)
rprintf(FINFO,"recv_files finished\n");
if (verbose > 2)
rprintf(FINFO,"recv_files finished\n");