summaryrefslogtreecommitdiff
path: root/receiver.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2007-04-26 23:06:38 +0000
committerWayne Davison <wayned@samba.org>2007-04-26 23:06:38 +0000
commita430691df19501367a7432a66402b4f6f603c700 (patch)
tree21367c76b24edda54dc0dba6e91aec132da774da /receiver.c
parent332cf6df7c32dbaa47cbfe515121da7bd53974e8 (diff)
downloadrsync-a430691df19501367a7432a66402b4f6f603c700.tar.gz
Prevent a hang in incremental-recursion mode when the receiver encounters
an error updating the file: the receiver now sends MSG_NO_SEND to the generator so that it knows when all outstanding work is completed.
Diffstat (limited to 'receiver.c')
-rw-r--r--receiver.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/receiver.c b/receiver.c
index 3fdd895c..94421c09 100644
--- a/receiver.c
+++ b/receiver.c
@@ -470,6 +470,8 @@ int recv_files(int f_in, char *local_name)
"(Skipping batched update for \"%s\")\n",
fname);
discard_receive_data(f_in, F_LENGTH(file));
+ if (inc_recurse)
+ send_msg_int(MSG_NO_SEND, ndx);
continue;
}
next_gen_ndx = -1;
@@ -553,6 +555,8 @@ int recv_files(int f_in, char *local_name)
full_fname(fnamecmp));
discard_receive_data(f_in, F_LENGTH(file));
close(fd1);
+ if (inc_recurse)
+ send_msg_int(MSG_NO_SEND, ndx);
continue;
}
@@ -566,6 +570,8 @@ int recv_files(int f_in, char *local_name)
full_fname(fnamecmp));
discard_receive_data(f_in, F_LENGTH(file));
close(fd1);
+ if (inc_recurse)
+ send_msg_int(MSG_NO_SEND, ndx);
continue;
}
@@ -599,6 +605,8 @@ int recv_files(int f_in, char *local_name)
discard_receive_data(f_in, F_LENGTH(file));
if (fd1 != -1)
close(fd1);
+ if (inc_recurse)
+ send_msg_int(MSG_NO_SEND, ndx);
continue;
}
} else {
@@ -606,6 +614,8 @@ int recv_files(int f_in, char *local_name)
discard_receive_data(f_in, F_LENGTH(file));
if (fd1 != -1)
close(fd1);
+ if (inc_recurse)
+ send_msg_int(MSG_NO_SEND, ndx);
continue;
}
@@ -632,6 +642,8 @@ int recv_files(int f_in, char *local_name)
discard_receive_data(f_in, F_LENGTH(file));
if (fd1 != -1)
close(fd1);
+ if (inc_recurse)
+ send_msg_int(MSG_NO_SEND, ndx);
continue;
}