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/hashlink.c 2004-08-13 18:04:59
-+++ hashlink.c 2004-08-13 18:04:59
-@@ -0,0 +1,342 @@
+--- orig/hashlink.c 2004-09-24 16:44:25
++++ hashlink.c 2004-09-24 16:44:25
+@@ -0,0 +1,340 @@
+/*
+ Copyright (C) Cronosys, LLC 2004
+
+ long this_fnbr;
+
+ *fnbr = 0;
-+
++
+ /* Build a list of potential candidates and open
+ * them. */
+ if ((d = opendir(hashname)) == NULL) {
+ /* There are no matches. */
+ return NULL;
+ }
-+
+ }
+
+ if (amt == -1) {
+int link_by_hash(char *fnametmp,char *fname,struct file_struct *file)
+{
+ STRUCT_STAT st;
-+ char *hashname = make_hash_name(file);
++ char *hashname = make_hash_name(file);
+ int first = 0, rc;
+ char *linkname;
+ long last_fnbr;
+ first = 1;
+ asprintf(&linkname,"%s/0",hashname);
+ rprintf(FINFO, "(1) linkname = %s\n", linkname);
-+
+ } else {
+ struct hashfile_struct *hashfiles, *hashfile;
-+ int fd;
+
+ if (do_stat(fnametmp,&st) == -1) {
+ rsyserr(FERROR, errno, "stat failed: %s", fname);
+ asprintf(&linkname,"%s/0",hashname);
+ rprintf(FINFO, "(2) linkname = %s\n", linkname);
+ } else {
-+
++ int fd;
+ /* Search for one identical to us. */
+ if ((fd = open(fnametmp,O_RDONLY|O_BINARY)) == -1) {
+ rsyserr(FERROR, errno, "open failed: %s", fnametmp);
+ }
+ hashfile = compare_hashfiles(fd, hashfiles);
+ hashfiles = NULL;
++ close(fd);
+
+ if (hashfile) {
+ first = 0;
+}
+
+#endif
---- orig/options.c 2004-09-20 05:10:48
+--- orig/options.c 2004-09-23 17:42:07
+++ options.c 2004-08-13 18:13:18
@@ -126,6 +126,7 @@ char *log_format = NULL;
char *password_file = NULL;
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 },
-@@ -616,6 +619,22 @@ int parse_arguments(int *argc, const cha
+@@ -616,6 +619,21 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
+ if (sanitize_paths)
+ arg = sanitize_path(NULL, arg, NULL, 0);
+ link_by_hash_dir = (char *)arg;
-+ checksum_seed = 12345;
+ break;
+#else
+ snprintf(err_buf, sizeof err_buf,
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -1083,6 +1102,11 @@ void server_options(char **args,int *arg
+@@ -1087,6 +1105,11 @@ void server_options(char **args,int *arg
args[ac++] = compare_dest;
}
if (ret < 0) {
rsyserr(FERROR, errno, "%s %s -> \"%s\"",
ret == -2 ? "copy" : "rename",
---- orig/rsync.h 2004-08-03 15:41:32
+--- orig/rsync.h 2004-09-22 08:47:31
+++ rsync.h 2004-07-03 20:20:15
-@@ -525,6 +525,14 @@ struct stats {
+@@ -526,6 +526,14 @@ struct stats {
int current_file_index;
};