if (cleanup_pid && cleanup_pid == getpid()) {
char *pidf = lp_pid_file();
if (pidf && *pidf)
---- orig/generator.c 2005-11-12 20:31:04
+--- orig/generator.c 2005-12-16 04:03:06
+++ generator.c 2005-12-08 23:17:08
@@ -65,7 +65,6 @@ extern OFF_T min_size;
extern int io_error;
extern int protocol_version;
extern int fuzzy_basis;
extern int always_checksum;
-@@ -94,6 +93,11 @@ extern struct filter_list_struct server_
-
- static int deletion_count = 0; /* used to implement --max-delete */
+@@ -96,6 +95,11 @@ static int deletion_count = 0; /* used t
+ static int can_link_symlinks = 1; /* start out optimistic */
+ static int can_link_devices = 1;
+/* These vars are local copies so that the receiver can use the originals. */
+static int GEN_append_mode;
/* For calling delete_file() */
#define DEL_FORCE_RECURSE (1<<1) /* recurse even w/o --force */
#define DEL_TERSE (1<<3)
-@@ -446,8 +450,8 @@ static void sum_sizes_sqroot(struct sum_
+@@ -445,8 +449,8 @@ static void sum_sizes_sqroot(struct sum_
}
if (protocol_version < 27) {
s2length = SUM_LENGTH;
} else {
int32 c;
-@@ -457,7 +461,7 @@ static void sum_sizes_sqroot(struct sum_
+@@ -456,7 +460,7 @@ static void sum_sizes_sqroot(struct sum_
for (c = blength; c >>= 1 && b; b--) {}
/* add a bit, subtract rollsum, round up. */
s2length = (b + 1 - 32 + 7) / 8; /* --optimize in compiler-- */
s2length = MIN(s2length, SUM_LENGTH);
}
-@@ -491,7 +495,7 @@ static void generate_and_send_sums(int f
+@@ -490,7 +494,7 @@ static void generate_and_send_sums(int f
sum_sizes_sqroot(&sum, len);
write_sum_head(f_out, &sum);
return;
if (len > 0)
-@@ -510,7 +514,7 @@ static void generate_and_send_sums(int f
+@@ -509,7 +513,7 @@ static void generate_and_send_sums(int f
if (f_copy >= 0) {
full_write(f_copy, map, n1);
continue;
}
-@@ -1063,7 +1067,7 @@ static void recv_generator(char *fname,
+@@ -1143,7 +1147,7 @@ static void recv_generator(char *fname,
return;
}
+ if (GEN_append_mode && st.st_size > file->length)
return;
- if (!compare_dest && fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
-@@ -1124,7 +1128,7 @@ static void recv_generator(char *fname,
+ if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
+@@ -1198,7 +1202,7 @@ static void recv_generator(char *fname,
goto notify_others;
}
if (!(backupptr = get_backup_name(fname))) {
close(fd);
return;
-@@ -1214,7 +1218,10 @@ void generate_files(int f_out, struct fi
+@@ -1288,7 +1292,10 @@ void generate_files(int f_out, struct fi
int save_ignore_existing = ignore_existing;
int save_ignore_non_existing = ignore_non_existing;
int save_do_progress = do_progress;
if (protocol_version >= 29) {
itemizing = 1;
-@@ -1243,7 +1250,7 @@ void generate_files(int f_out, struct fi
+@@ -1317,7 +1324,7 @@ void generate_files(int f_out, struct fi
do_delete_pass(flist);
do_progress = 0;
whole_file = 0;
if (verbose >= 2) {
rprintf(FINFO, "delta-transmission %s\n",
-@@ -1252,12 +1259,6 @@ void generate_files(int f_out, struct fi
+@@ -1326,12 +1333,6 @@ void generate_files(int f_out, struct fi
: "enabled");
}
for (i = 0; i < flist->count; i++) {
struct file_struct *file = flist->files[i];
-@@ -1301,23 +1302,34 @@ void generate_files(int f_out, struct fi
+@@ -1375,23 +1376,34 @@ void generate_files(int f_out, struct fi
delete_in_dir(NULL, NULL, NULL);
phase++;
if (local_name)
strlcpy(fbuf, local_name, sizeof fbuf);
else
-@@ -1329,27 +1341,43 @@ void generate_files(int f_out, struct fi
+@@ -1403,27 +1415,43 @@ void generate_files(int f_out, struct fi
phase++;
ignore_non_existing = save_ignore_non_existing;
ignore_existing = save_ignore_existing;
- write_batch_monitor_out = -1;
- write_batch_monitor_in = -1;
-}
---- orig/log.c 2005-10-26 16:49:08
-+++ log.c 2005-12-08 23:17:09
+--- orig/log.c 2005-12-16 04:03:06
++++ log.c 2005-12-16 04:04:49
@@ -35,7 +35,6 @@ extern int am_sender;
extern int local_server;
extern int quiet;
-extern int msg_fd_out;
extern int protocol_version;
extern int preserve_times;
- extern int log_format_has_o_or_i;
-@@ -67,7 +66,7 @@ struct {
+ extern int log_format_has_i;
+@@ -68,7 +67,7 @@ struct {
{ RERR_IPC , "error in IPC code" },
{ RERR_CRASHED , "sibling process crashed" },
{ RERR_TERMINATED , "sibling process terminated abnormally" },
-- { RERR_SIGNAL , "received SIGUSR1 or SIGINT" },
-+ { RERR_SIGNAL , "received SIGINT, SIGHUP, or SIGTERM" },
+- { RERR_SIGNAL , "received SIGINT, SIGTERM, SIGHUP, or SIGUSR1" },
++ { RERR_SIGNAL , "received SIGINT, SIGTERM, or SIGHUP" },
{ RERR_WAITCHILD , "waitpid() failed" },
{ RERR_MALLOC , "error allocating core memory buffers" },
{ RERR_PARTIAL , "some files could not be transferred" },
-@@ -204,8 +203,8 @@ void rwrite(enum logcode code, char *buf
+@@ -205,8 +204,8 @@ void rwrite(enum logcode code, char *buf
buf[len] = 0;
- return am_sender ? "sender" : am_generator ? "generator" : "receiver";
+ return am_sender ? "sender" : am_generator() ? "generator" : "receiver";
}
---- orig/rsync.h 2005-11-12 20:31:04
+--- orig/rsync.h 2005-12-15 23:00:49
+++ rsync.h 2005-12-10 19:02:58
-@@ -166,10 +166,8 @@ enum msgcode {
+@@ -165,10 +165,8 @@ enum msgcode {
MSG_DATA=0, /* raw data on the multiplexed stream */
MSG_ERROR=FERROR, MSG_INFO=FINFO, /* remote logging */
MSG_LOG=FLOG, MSG_FCLIENT=FCLIENT, /* sibling logging */
};
#include "errcode.h"
-@@ -320,6 +318,7 @@ enum msgcode {
+@@ -319,6 +317,7 @@ enum msgcode {
#endif
#include <assert.h>