From: Wayne Davison Date: Thu, 22 Jul 2004 03:12:12 +0000 (+0000) Subject: When --read-batch was specified, do not put the generator's output X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/commitdiff_plain/dc8e6f704cdcdc461948f779dfbf3b5a36aa4bba When --read-batch was specified, do not put the generator's output into multiplexed mode (there's no sender to receive the messages). --- diff --git a/remove-sent-files.diff b/remove-sent-files.diff index 6d3cbe1..e0abd3f 100644 --- a/remove-sent-files.diff +++ b/remove-sent-files.diff @@ -4,9 +4,9 @@ command before "make": make proto ---- orig/io.c 2004-07-20 21:36:07 +--- orig/io.c 2004-07-21 23:59:35 +++ io.c 2004-07-03 20:17:10 -@@ -239,6 +239,14 @@ static void read_msg_fd(void) +@@ -240,6 +240,14 @@ static void read_msg_fd(void) read_loop(fd, buf, 4); redo_list_add(IVAL(buf,0)); break; @@ -21,7 +21,7 @@ command before "make": case MSG_INFO: case MSG_ERROR: case MSG_LOG: -@@ -672,6 +680,16 @@ static int readfd_unbuffered(int fd, cha +@@ -673,6 +681,16 @@ static int readfd_unbuffered(int fd, cha read_loop(fd, iobuf_in, remaining); iobuf_in_ndx = 0; break; @@ -38,8 +38,8 @@ command before "make": case MSG_INFO: case MSG_ERROR: if (remaining >= sizeof line) { ---- orig/main.c 2004-07-19 17:14:44 -+++ main.c 2004-07-15 02:29:03 +--- orig/main.c 2004-07-21 23:59:35 ++++ main.c 2004-07-22 03:06:20 @@ -42,6 +42,7 @@ extern int list_only; extern int local_server; extern int log_got_error; @@ -48,7 +48,7 @@ command before "make": extern int orig_umask; extern int keep_dirlinks; extern int preserve_hard_links; -@@ -600,6 +601,8 @@ void start_server(int f_in, int f_out, i +@@ -610,6 +611,8 @@ void start_server(int f_in, int f_out, i if (am_sender) { keep_dirlinks = 0; /* Must be disabled on the sender. */ @@ -57,17 +57,17 @@ command before "make": recv_exclude_list(f_in); if (cvs_exclude) -@@ -680,6 +683,9 @@ int client_run(int f_in, int f_out, pid_ +@@ -681,6 +684,9 @@ int client_run(int f_in, int f_out, pid_ exit_cleanup(status); } -+ if (need_messages_from_generator) ++ if (need_messages_from_generator && !read_batch) + io_start_multiplex_out(f_out); + if (argc == 0) list_only = 1; ---- orig/options.c 2004-07-20 21:36:07 +--- orig/options.c 2004-07-21 23:59:35 +++ options.c 2004-07-16 20:09:54 @@ -87,8 +87,10 @@ int size_only = 0; int bwlimit = 0; @@ -119,7 +119,7 @@ command before "make": case OPT_EXCLUDE: if (am_server || sanitize_paths) return 0; /* Impossible... */ -@@ -1019,6 +1028,9 @@ void server_options(char **args,int *arg +@@ -1024,6 +1033,9 @@ void server_options(char **args,int *arg } } @@ -129,9 +129,9 @@ command before "make": *argc = ac; return; ---- orig/receiver.c 2004-07-20 21:36:07 +--- orig/receiver.c 2004-07-22 02:58:15 +++ receiver.c 2004-07-16 20:09:48 -@@ -43,6 +43,7 @@ extern char *backup_dir; +@@ -45,6 +45,7 @@ extern char *backup_dir; extern char *backup_suffix; extern int backup_suffix_len; extern int cleanup_got_literal; @@ -139,7 +139,7 @@ command before "make": extern int module_id; extern int ignore_errors; extern int orig_umask; -@@ -335,7 +336,7 @@ int recv_files(int f_in, struct file_lis +@@ -338,7 +339,7 @@ int recv_files(int f_in, struct file_lis char *fname, fbuf[MAXPATHLEN]; char template[MAXPATHLEN]; char fnametmp[MAXPATHLEN]; @@ -148,7 +148,7 @@ command before "make": char fnamecmpbuf[MAXPATHLEN]; struct file_struct *file; struct stats initial_stats; -@@ -528,16 +529,20 @@ int recv_files(int f_in, struct file_lis +@@ -551,16 +552,20 @@ int recv_files(int f_in, struct file_lis cleanup_disable();