aboutsummaryrefslogtreecommitdiffstats
path: root/receiver.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-02-20 02:54:30 +0000
committerWayne Davison <wayned@samba.org>2005-02-20 02:54:30 +0000
commitcd6bececc1576edf3d463d8ed30a8e867ca7f43b (patch)
tree1285a25c43f6abe82d641829ac94bc12f8afbf04 /receiver.c
parent88b93c61593525d41dec77a00da51814fa3a94c1 (diff)
downloadandroid_external_rsync-cd6bececc1576edf3d463d8ed30a8e867ca7f43b.tar.gz
android_external_rsync-cd6bececc1576edf3d463d8ed30a8e867ca7f43b.tar.bz2
android_external_rsync-cd6bececc1576edf3d463d8ed30a8e867ca7f43b.zip
If --delay-updates is specified with --remove-sent-files, delay
the MSG_SUCCESS messages until we actually move the files into place at the end.
Diffstat (limited to 'receiver.c')
-rw-r--r--receiver.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/receiver.c b/receiver.c
index 48937f63..719a58bb 100644
--- a/receiver.c
+++ b/receiver.c
@@ -597,7 +597,9 @@ int recv_files(int f_in, struct file_list *flist, char *local_name,
cleanup_disable();
if (recv_ok) {
- if (remove_sent_files) {
+ if (delay_updates && delayed_bits[i/8] & (1 << (i % 8)))
+ ;
+ else if (remove_sent_files) {
SIVAL(numbuf, 0, i);
send_msg(MSG_SUCCESS, numbuf, 4);
}
@@ -654,6 +656,10 @@ int recv_files(int f_in, struct file_list *flist, char *local_name,
full_fname(fname),
safe_fname(partialptr));
} else {
+ if (remove_sent_files) {
+ SIVAL(numbuf, 0, i);
+ send_msg(MSG_SUCCESS,numbuf,4);
+ }
handle_partial_dir(partialptr,
PDIR_DELETE);
}