summaryrefslogtreecommitdiff
path: root/receiver.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-07-22 08:16:35 +0000
committerWayne Davison <wayned@samba.org>2004-07-22 08:16:35 +0000
commit007e3c0e9a3e153e5c8c170ee508d5e2c86562a4 (patch)
treea486f8b0535150a9aaa47ccb08a44ac8c66000be /receiver.c
parente2bc4126691bdbc8ab78e6e56c72bf1d8bc51168 (diff)
downloadrsync-007e3c0e9a3e153e5c8c170ee508d5e2c86562a4.tar.gz
Need to output the "failed verification" error before sending the
MSG_REDO so that the output comes out in the right order.
Diffstat (limited to 'receiver.c')
-rw-r--r--receiver.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/receiver.c b/receiver.c
index 1fe97335..50fe2e5e 100644
--- a/receiver.c
+++ b/receiver.c
@@ -552,25 +552,27 @@ int recv_files(int f_in, struct file_list *flist, char *local_name)
cleanup_disable();
if (!recv_ok) {
- int msgtype;
- char *redostr;
+ int msgtype = csum_length == SUM_LENGTH || read_batch ?
+ FERROR : FINFO;
+ if (msgtype == FERROR || verbose) {
+ char *errstr, *redostr;
+ char *keptstr = keep_partial || inplace ?
+ "retain" : "discard";
+ if (msgtype == FERROR) {
+ errstr = "ERROR";
+ redostr = "";
+ } else {
+ errstr = "WARNING";
+ redostr = " (will try again)";
+ }
+ rprintf(msgtype,
+ "%s: %s failed verification -- update %sed%s.\n",
+ errstr, fname, keptstr, redostr);
+ }
if (csum_length != SUM_LENGTH) {
char buf[4];
SIVAL(buf, 0, i);
send_msg(MSG_REDO, buf, 4);
- msgtype = read_batch ? FERROR : FINFO;
- redostr = read_batch ? " Redo doubtful."
- : " Redo pending.";
- } else {
- msgtype = FERROR;
- redostr = "";
- }
- if (verbose || read_batch) {
- rprintf(msgtype,
- "%s: %s failed verification. Update %sed.%s\n",
- msgtype == FERROR ? "ERROR" : "WARNING",
- fname, keep_partial || inplace ?
- "retain" : "discard", redostr);
}
}
}