From 8857e5dd70785b81146a6685d69f910627291dac Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 5 Feb 2006 05:08:54 +0000 Subject: [PATCH] Fixed a failing hunk. --- threaded-receiver.diff | 58 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/threaded-receiver.diff b/threaded-receiver.diff index 8a303de..a2ededd 100644 --- a/threaded-receiver.diff +++ b/threaded-receiver.diff @@ -31,13 +31,13 @@ Be sure to run "make proto" before running "make". CC=@CC@ CFLAGS=@CFLAGS@ CPPFLAGS=@CPPFLAGS@ ---- orig/cleanup.c 2006-02-02 02:41:08 -+++ cleanup.c 2006-02-02 02:43:34 +--- orig/cleanup.c 2006-02-03 20:00:35 ++++ cleanup.c 2006-02-03 20:07:44 @@ -26,10 +26,6 @@ extern int keep_partial; extern int log_got_error; extern char *partial_dir; --#if defined HAVE_SIGACTION && defined HAVE_SIGPROCMASK +-#ifdef HAVE_SIGACTION -static struct sigaction sigact; -#endif - @@ -277,7 +277,7 @@ Be sure to run "make proto" before running "make". } do_progress = save_do_progress; ---- orig/io.c 2006-02-01 19:37:05 +--- orig/io.c 2006-02-04 21:53:39 +++ io.c 2006-02-01 19:50:09 @@ -47,7 +47,6 @@ extern int allowed_lull; extern int am_server; @@ -637,7 +637,7 @@ Be sure to run "make proto" before running "make". if (io_filesfrom_f_out >= 0) { if (io_filesfrom_buflen) { if (FD_ISSET(io_filesfrom_f_out, &w_fds)) { -@@ -831,6 +787,8 @@ static void readfd(int fd, char *buffer, +@@ -832,6 +788,8 @@ static void readfd(int fd, char *buffer, } if (fd == write_batch_monitor_in) { @@ -646,7 +646,7 @@ Be sure to run "make proto" before running "make". if ((size_t)write(batch_fd, buffer, total) != total) exit_cleanup(RERR_FILEIO); } -@@ -1086,7 +1044,6 @@ static void writefd_unbuffered(int fd,ch +@@ -1087,7 +1045,6 @@ static void writefd_unbuffered(int fd,ch * to grab any messages they sent before they died. */ while (fd == sock_f_out && io_multiplexing_in) { set_io_timeout(30); @@ -654,7 +654,7 @@ Be sure to run "make proto" before running "make". readfd_unbuffered(sock_f_in, io_filesfrom_buf, sizeof io_filesfrom_buf); } -@@ -1096,7 +1053,7 @@ static void writefd_unbuffered(int fd,ch +@@ -1097,7 +1054,7 @@ static void writefd_unbuffered(int fd,ch total += cnt; if (fd == sock_f_out) { @@ -663,7 +663,7 @@ Be sure to run "make proto" before running "make". last_io_out = time(NULL); sleep_for_bwlimit(cnt); } -@@ -1120,7 +1077,7 @@ static void mplex_write(enum msgcode cod +@@ -1121,7 +1078,7 @@ static void mplex_write(enum msgcode cod * cause output to occur down the socket. Setting contiguous_write_len * prevents the reading of msg_fd_in once we actually start to write * this sequence of data (though we might read it before the start). */ @@ -672,7 +672,7 @@ Be sure to run "make proto" before running "make". contiguous_write_len = len + 4; if (n > sizeof buffer - 4) -@@ -1135,31 +1092,29 @@ static void mplex_write(enum msgcode cod +@@ -1137,31 +1094,29 @@ static void mplex_write(enum msgcode cod if (len) writefd_unbuffered(sock_f_out, buf, len); @@ -716,7 +716,7 @@ Be sure to run "make proto" before running "make". if (fd == sock_f_out) stats.total_written += len; -@@ -1372,9 +1327,3 @@ void start_write_batch(int fd) +@@ -1374,9 +1329,3 @@ void start_write_batch(int fd) else write_batch_monitor_in = fd; } @@ -726,9 +726,9 @@ Be sure to run "make proto" before running "make". - write_batch_monitor_out = -1; - write_batch_monitor_in = -1; -} ---- orig/log.c 2006-02-01 19:37:05 +--- orig/log.c 2006-02-05 04:53:34 +++ log.c 2005-12-16 23:49:57 -@@ -35,7 +35,6 @@ extern int am_sender; +@@ -38,7 +38,6 @@ extern int am_sender; extern int local_server; extern int quiet; extern int module_id; @@ -736,7 +736,7 @@ Be sure to run "make proto" before running "make". extern int protocol_version; extern int preserve_times; extern int log_format_has_i; -@@ -68,7 +67,6 @@ struct { +@@ -74,7 +73,6 @@ struct { { RERR_IPC , "error in IPC code" }, { RERR_CRASHED , "sibling process crashed" }, { RERR_TERMINATED , "sibling process terminated abnormally" }, @@ -744,7 +744,7 @@ Be sure to run "make proto" before running "make". { RERR_SIGNAL , "received SIGINT, SIGTERM, or SIGHUP" }, { RERR_WAITCHILD , "waitpid() failed" }, { RERR_MALLOC , "error allocating core memory buffers" }, -@@ -224,8 +222,8 @@ void rwrite(enum logcode code, char *buf +@@ -234,8 +232,8 @@ void rwrite(enum logcode code, char *buf if (quiet && code == FINFO) return; @@ -755,7 +755,7 @@ Be sure to run "make proto" before running "make". send_msg((enum msgcode)code, buf, len); return; } ---- orig/main.c 2006-02-02 02:41:09 +--- orig/main.c 2006-02-05 04:53:34 +++ main.c 2006-02-02 02:43:44 @@ -30,7 +30,6 @@ extern int list_only; extern int am_root; @@ -765,7 +765,7 @@ Be sure to run "make proto" before running "make". extern int am_daemon; extern int blocking_io; extern int remove_sent_files; -@@ -80,9 +79,20 @@ struct pid_status { +@@ -84,9 +83,20 @@ struct pid_status { static time_t starttime, endtime; static int64 total_read, total_written; @@ -786,7 +786,7 @@ Be sure to run "make proto" before running "make". /* Works like waitpid(), but if we already harvested the child pid in our * sigchld_handler(), we succeed instead of returning an error. */ pid_t wait_process(pid_t pid, int *status_ptr, int flags) -@@ -159,7 +169,7 @@ static void handle_stats(int f) +@@ -163,7 +173,7 @@ static void handle_stats(int f) show_flist_stats(); } @@ -795,7 +795,7 @@ Be sure to run "make proto" before running "make". return; if (am_daemon) { -@@ -614,12 +624,30 @@ static void do_server_sender(int f_in, i +@@ -618,12 +628,30 @@ static void do_server_sender(int f_in, i exit_cleanup(0); } @@ -829,7 +829,7 @@ Be sure to run "make proto" before running "make". /* The receiving side mustn't obey this, or an existing symlink that * points to an identical file won't be replaced by the referent. */ -@@ -628,70 +656,16 @@ static int do_recv(int f_in,int f_out,st +@@ -632,70 +660,16 @@ static int do_recv(int f_in,int f_out,st if (preserve_hard_links) init_hard_links(); @@ -905,7 +905,7 @@ Be sure to run "make proto" before running "make". generate_files(f_out, flist, local_name); handle_stats(-1); -@@ -702,10 +676,13 @@ static int do_recv(int f_in,int f_out,st +@@ -706,10 +680,13 @@ static int do_recv(int f_in,int f_out,st } io_flush(FULL_FLUSH); @@ -923,7 +923,7 @@ Be sure to run "make proto" before running "make". } -@@ -1067,22 +1044,6 @@ static int start_client(int argc, char * +@@ -1077,22 +1054,6 @@ static int start_client(int argc, char * return ret; } @@ -946,8 +946,8 @@ Be sure to run "make proto" before running "make". static RETSIGTYPE sigchld_handler(UNUSED(int val)) { #ifdef WNOHANG -@@ -1172,8 +1133,6 @@ int main(int argc,char *argv[]) - sigemptyset(&sigmask); +@@ -1184,8 +1145,6 @@ int main(int argc,char *argv[]) + # endif sigact.sa_flags = SA_NOCLDSTOP; #endif - SIGACTMASK(SIGUSR1, sigusr1_handler); @@ -993,7 +993,7 @@ Be sure to run "make proto" before running "make". show_progress(last_match, buf->file_size); sum_update(map_ptr(buf, last_match, len), len); last_match = s->flength; ---- orig/options.c 2006-01-31 03:11:30 +--- orig/options.c 2006-02-03 23:51:57 +++ options.c 2005-12-08 23:17:09 @@ -73,7 +73,6 @@ int def_compress_level = Z_DEFAULT_COMPR int am_root = 0; @@ -1160,9 +1160,9 @@ Be sure to run "make proto" before running "make". } } make_backups = save_make_backups; ---- orig/rsync.c 2006-02-02 02:41:09 +--- orig/rsync.c 2006-02-05 04:53:34 +++ rsync.c 2005-12-08 23:17:10 -@@ -32,7 +32,6 @@ extern int orig_umask; +@@ -41,7 +41,6 @@ extern int orig_umask; extern int am_root; extern int am_server; extern int am_sender; @@ -1170,14 +1170,14 @@ Be sure to run "make proto" before running "make". extern int am_starting_up; extern int preserve_uid; extern int preserve_gid; -@@ -247,5 +246,5 @@ const char *who_am_i(void) +@@ -288,5 +287,5 @@ const char *who_am_i(void) { if (am_starting_up) return am_server ? "server" : "client"; - return am_sender ? "sender" : am_generator ? "generator" : "receiver"; + return am_sender ? "sender" : am_generator() ? "generator" : "receiver"; } ---- orig/rsync.h 2006-02-02 02:41:09 +--- orig/rsync.h 2006-02-03 20:00:36 +++ rsync.h 2006-01-17 02:46:03 @@ -166,10 +166,8 @@ enum msgcode { MSG_DATA=0, /* raw data on the multiplexed stream */ @@ -1198,7 +1198,7 @@ Be sure to run "make proto" before running "make". #include "lib/pool_alloc.h" ---- orig/util.c 2006-01-30 07:18:28 +--- orig/util.c 2006-02-03 20:00:36 +++ util.c 2005-12-08 23:17:10 @@ -413,51 +413,6 @@ int robust_rename(char *from, char *to, return -1; -- 2.34.1