diff --git a/clientserver.c b/clientserver.c
--- a/clientserver.c
+++ b/clientserver.c
-@@ -38,6 +38,7 @@ extern int sanitize_paths;
+@@ -39,6 +39,7 @@ extern int numeric_ids;
extern int filesfrom_fd;
extern int remote_protocol;
extern int protocol_version;
extern int io_timeout;
extern int no_detach;
extern int write_batch;
-@@ -708,6 +709,8 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
+@@ -746,6 +747,8 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
else if (am_root < 0) /* Treat --fake-super from client as --super. */
am_root = 2;
+ counts_match = used == checksum_matches;
+ no_skipped = whole_dir && regular_skipped == 0;
+
-+ clean_flist(checksum_flist, 0);
++ flist_sort_and_clean(checksum_flist, 0);
+
+ checksum_flist->used = 0;
+ checksum_matches = 0;
}
fclose(fp);
-@@ -1272,6 +1394,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1278,6 +1400,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level)) {
if (ignore_perishable)
non_perishable_cnt++;
return NULL;
}
-@@ -1402,13 +1526,36 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1408,13 +1532,36 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
int j;
if (flist && (j = flist_find(checksum_flist, file)) >= 0) {
struct file_struct *fp = checksum_flist->sorted[j];
}
/* This code is only used by the receiver when it is building
-@@ -1703,6 +1850,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
+@@ -1709,6 +1856,9 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
closedir(d);
if (f >= 0 && recurse && !divert_dirs) {
int i, end = flist->used - 1;
/* send_if_directory() bumps flist->used, so use "end". */
-@@ -2265,7 +2415,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+@@ -2274,6 +2424,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
+ }
+ } else
flist_eof = 1;
-
- if (checksum_updating && always_checksum && flist_eof)
-- read_checksums(NULL);
++
++ if (checksum_updating && always_checksum && flist_eof)
+ read_checksums(NULL); /* writes any last updates */
return flist;
diff --git a/loadparm.c b/loadparm.c
--- a/loadparm.c
+++ b/loadparm.c
-@@ -153,6 +153,7 @@ typedef struct
+@@ -154,6 +154,7 @@ typedef struct
int syslog_facility;
int timeout;
BOOL fake_super;
BOOL ignore_errors;
BOOL ignore_nonreadable;
-@@ -202,6 +203,7 @@ static service sDefault =
+@@ -205,6 +206,7 @@ static service sDefault =
/* syslog_facility; */ LOG_DAEMON,
/* timeout; */ 0,
/* fake_super; */ False,
/* ignore_errors; */ False,
/* ignore_nonreadable; */ False,
-@@ -301,6 +303,7 @@ static struct parm_struct parm_table[] =
- {"socket options", P_STRING, P_GLOBAL,&Globals.socket_options, NULL,0},
+@@ -306,6 +308,7 @@ static struct parm_struct parm_table[] =
{"auth users", P_STRING, P_LOCAL, &sDefault.auth_users, NULL,0},
+ {"charset", P_STRING, P_LOCAL, &sDefault.charset, NULL,0},
+ {"checksum updating", P_BOOL, P_LOCAL, &sDefault.checksum_updating, NULL,0},
{"comment", P_STRING, P_LOCAL, &sDefault.comment, NULL,0},
{"dont compress", P_STRING, P_LOCAL, &sDefault.dont_compress, NULL,0},
{"exclude from", P_STRING, P_LOCAL, &sDefault.exclude_from, NULL,0},
-@@ -421,6 +424,7 @@ FN_LOCAL_INTEGER(lp_max_connections, max_connections)
- FN_LOCAL_INTEGER(lp_max_verbosity, max_verbosity)
+@@ -428,6 +431,7 @@ FN_LOCAL_INTEGER(lp_max_verbosity, max_verbosity)
+ FN_LOCAL_INTEGER(lp_syslog_facility, syslog_facility)
FN_LOCAL_INTEGER(lp_timeout, timeout)
+FN_LOCAL_BOOL(lp_checksum_updating, checksum_updating)
int max_delete = INT_MIN;
OFF_T max_size = 0;
OFF_T min_size = 0;
-@@ -312,6 +313,7 @@ void usage(enum logcode F)
+@@ -316,6 +317,7 @@ void usage(enum logcode F)
rprintf(F," -q, --quiet suppress non-error messages\n");
rprintf(F," --no-motd suppress daemon-mode MOTD (see manpage caveat)\n");
rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n");
rprintf(F," -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)\n");
rprintf(F," --no-OPTION turn off an implied OPTION (e.g. --no-D)\n");
rprintf(F," -r, --recursive recurse into directories\n");
-@@ -560,6 +562,7 @@ static struct poptOption long_options[] = {
+@@ -566,6 +568,7 @@ static struct poptOption long_options[] = {
{"checksum", 'c', POPT_ARG_VAL, &always_checksum, 1, 0, 0 },
{"no-checksum", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
{"no-c", 0, POPT_ARG_VAL, &always_checksum, 0, 0, 0 },
{"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -1965,7 +1968,9 @@ void server_options(char **args, int *argc_p)
+@@ -1988,7 +1991,9 @@ void server_options(char **args, int *argc_p)
args[ac++] = basis_dir[i];
}
}
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -678,6 +678,10 @@ extern int xattrs_ndx;
+@@ -680,6 +680,10 @@ extern int xattrs_ndx;
#define F_SUM(f) ((char*)OPT_EXTRA(f, LEN64_BUMP(f) + HLINK_BUMP(f) \
+ SUM_EXTRA_CNT - 1))
+
Note that rsync always verifies that each em(transferred) file was
correctly reconstructed on the receiving side by checking a whole-file
- checksum that is generated when as the file is transferred, but that
+ checksum that is generated as the file is transferred, but that
automatic after-the-transfer verification has nothing to do with this
option's before-the-transfer "Does this file need to be updated?" check.
diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
--- a/rsyncd.conf.yo
+++ b/rsyncd.conf.yo
-@@ -241,6 +241,20 @@ locking on this file to ensure that the max connections limit is not
+@@ -281,6 +281,20 @@ locking on this file to ensure that the max connections limit is not
exceeded for the modules sharing the lock file.
The default is tt(/var/run/rsyncd.lock).