summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-01-29 23:49:36 +0000
committerAndrew Tridgell <tridge@samba.org>2000-01-29 23:49:36 +0000
commit8ada7518907e7606a28baac85840a5c56a010c5e (patch)
tree9369d33da4001ea525a1d09bdec4f2550c37086f
parent1a52e8487404a431acca4b04f558869805bc60db (diff)
downloadrsync-8ada7518907e7606a28baac85840a5c56a010c5e.tar.gz
damn.
with the new error handling code it is possible for rsync to get stuck on the final transaction, leaving it hung. looks like 2.4.1 will be pretty soon
-rw-r--r--main.c12
-rw-r--r--rsync.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/main.c b/main.c
index 11344eb2..ac5c1d2f 100644
--- a/main.c
+++ b/main.c
@@ -283,6 +283,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
extern int delete_after;
extern int recurse;
extern int delete_mode;
+ extern int remote_version;
if (preserve_hard_links)
init_hard_links(flist);
@@ -320,6 +321,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
recv_files(f_in,flist,local_name,recv_pipe[1]);
report(f_in);
+ write_int(recv_pipe[1],-1);
io_flush();
_exit(0);
}
@@ -335,7 +337,13 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
generate_files(f_out,flist,local_name,recv_pipe[0]);
+ read_int(recv_pipe[1]);
+ if (remote_version >= 24) {
+ /* send a final goodbye message */
+ write_int(f_out, -1);
+ }
io_flush();
+
wait_process(pid, &status);
return status;
}
@@ -452,6 +460,10 @@ int client_run(int f_in, int f_out, int pid, int argc, char *argv[])
wait_process(pid, &status);
}
report(-1);
+ if (remote_version >= 24) {
+ /* final goodbye message */
+ read_int(f_in);
+ }
exit_cleanup(status);
}
diff --git a/rsync.h b/rsync.h
index 471449e0..a4b7e812 100644
--- a/rsync.h
+++ b/rsync.h
@@ -47,7 +47,7 @@
#define SAME_TIME (1<<7)
/* update this if you make incompatible changes */
-#define PROTOCOL_VERSION 23
+#define PROTOCOL_VERSION 24
#define MIN_PROTOCOL_VERSION 15
#define MAX_PROTOCOL_VERSION 30