DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
popt/popthelp.o popt/poptparse.o
---- orig/cleanup.c 2005-03-05 18:58:38
+--- orig/cleanup.c 2005-11-10 16:58:36
+++ cleanup.c 2005-01-10 10:40:51
@@ -25,6 +25,7 @@ extern int io_error;
extern int keep_partial;
#define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */
#define RERR_WAITCHILD 21 /* some error returned by waitpid() */
---- orig/flist.c 2005-11-07 04:29:01
+--- orig/flist.c 2005-11-10 16:58:36
+++ flist.c 2005-03-05 00:29:08
@@ -57,6 +57,7 @@ extern int copy_unsafe_links;
extern int protocol_version;
extern struct stats stats;
extern struct file_list *the_file_list;
-@@ -334,7 +335,10 @@ void send_file_entry(struct file_struct
+@@ -336,7 +337,10 @@ void send_file_entry(struct file_struct
io_write_phase = "send_file_entry";
flags = base_flags;
-@@ -543,6 +547,9 @@ static struct file_struct *receive_file_
+@@ -544,6 +548,9 @@ static struct file_struct *receive_file_
strlcpy(lastname, thisname, MAXPATHLEN);
clean_fname(thisname, 0);
if (sanitize_paths)
-@@ -1073,6 +1080,9 @@ struct file_list *send_file_list(int f,
+@@ -1074,6 +1081,9 @@ struct file_list *send_file_list(int f,
start_write = stats.total_written;
gettimeofday(&start_tv, NULL);
flist = flist_new(WITH_HLINK, "send_file_list");
io_start_buffering_out();
-@@ -1285,6 +1295,9 @@ struct file_list *send_file_list(int f,
+@@ -1286,6 +1296,9 @@ struct file_list *send_file_list(int f,
stats.flist_size = stats.total_written - start_write;
stats.num_files = flist->count;
if (verbose > 3)
output_flist(flist);
-@@ -1305,6 +1318,9 @@ struct file_list *recv_file_list(int f)
+@@ -1306,6 +1319,9 @@ struct file_list *recv_file_list(int f)
start_read = stats.total_read;
+ if (verbose > 2)
+ rprintf(FINFO, "Converted filename: %s -> %s\n", src, dest);
+}
---- orig/generator.c 2005-10-30 22:30:28
+--- orig/generator.c 2005-12-16 04:03:06
+++ generator.c 2005-03-05 00:29:37
-@@ -594,7 +594,13 @@ static int phase = 0;
- * start sending checksums.
+@@ -761,7 +761,13 @@ static int phase = 0;
+ * When fname is non-null, it must point to a MAXPATHLEN buffer!
*
* Note that f_out is set to -1 when doing final directory-permission and
- * modification-time repair. */
static void recv_generator(char *fname, struct file_struct *file, int ndx,
int itemizing, int maybe_PERMS_REPORT,
enum logcode code, int f_out)
---- orig/log.c 2005-10-26 16:49:08
-+++ log.c 2005-09-29 17:23:54
-@@ -67,6 +67,7 @@ struct {
+--- orig/log.c 2005-12-16 04:03:06
++++ log.c 2005-12-16 04:03:49
+@@ -68,6 +68,7 @@ struct {
{ RERR_IPC , "error in IPC code" },
{ RERR_CRASHED , "sibling process crashed" },
{ RERR_TERMINATED , "sibling process terminated abnormally" },
+ { RERR_FNAMECONV , "error in filename conversion" },
- { RERR_SIGNAL , "received SIGUSR1 or SIGINT" },
+ { RERR_SIGNAL , "received SIGINT, SIGTERM, SIGHUP, or SIGUSR1" },
{ RERR_WAITCHILD , "waitpid() failed" },
{ RERR_MALLOC , "error allocating core memory buffers" },
---- orig/main.c 2005-11-02 07:22:12
+--- orig/main.c 2005-12-15 07:55:39
+++ main.c 2004-07-22 00:31:47
-@@ -388,7 +388,7 @@ static pid_t do_cmd(char *cmd, char *mac
+@@ -414,7 +414,7 @@ static pid_t do_cmd(char *cmd, char *mac
whole_file = 1;
ret = local_child(argc, args, f_in, f_out, child_main);
} else
if (dir)
free(dir);
---- orig/options.c 2005-11-07 04:29:01
+--- orig/options.c 2005-11-15 18:21:22
+++ options.c 2005-10-26 16:49:33
-@@ -141,6 +141,7 @@ char *basis_dir[MAX_BASIS_DIRS+1];
+@@ -142,6 +142,7 @@ char *basis_dir[MAX_BASIS_DIRS+1];
char *config_file = NULL;
char *shell_cmd = NULL;
char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
-@@ -329,6 +330,7 @@ void usage(enum logcode F)
+@@ -330,6 +331,7 @@ void usage(enum logcode F)
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
rprintf(F," -z, --compress compress file data during the transfer\n");
rprintf(F," --compress-level=NUM explicitly set compression level\n");
rprintf(F," -C, --cvs-exclude auto-ignore files the same way CVS does\n");
-@@ -459,6 +461,7 @@ static struct poptOption long_options[]
+@@ -464,6 +466,7 @@ static struct poptOption long_options[]
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
{"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
+
+ return result;
+}
---- orig/util.c 2005-10-16 22:38:40
+--- orig/util.c 2005-11-12 20:13:05
+++ util.c 2004-07-03 20:18:02
-@@ -1353,3 +1353,55 @@ uint32 fuzzy_distance(const char *s1, in
+@@ -1411,3 +1411,55 @@ uint32 fuzzy_distance(const char *s1, in
return a[len2-1];
}
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>