X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/cc3e685d09b2095099fc396157d19172ab3ef7c4..63bb92e3343c5d762dec2ff150bb3e5e165d05db:/checksum-reading.diff diff --git a/checksum-reading.diff b/checksum-reading.diff index ef5ace4..2dd412b 100644 --- a/checksum-reading.diff +++ b/checksum-reading.diff @@ -19,15 +19,15 @@ To use this patch, run these commands for a successful build: diff --git a/flist.c b/flist.c --- a/flist.c +++ b/flist.c -@@ -122,6 +122,7 @@ static char empty_sum[MAX_DIGEST_LEN]; +@@ -121,6 +121,7 @@ static char tmp_sum[MAX_DIGEST_LEN]; + static char empty_sum[MAX_DIGEST_LEN]; static int flist_count_offset; /* for --delete --progress */ static int dir_count = 0; - static int high_hlink_ndx; +static struct file_list *checksum_flist = NULL; - static void clean_flist(struct file_list *flist, int strip_root); + static void flist_sort_and_clean(struct file_list *flist, int strip_root); static void output_flist(struct file_list *flist); -@@ -314,6 +315,186 @@ static void flist_done_allocating(struct file_list *flist) +@@ -313,6 +314,186 @@ static void flist_done_allocating(struct file_list *flist) flist->pool_boundary = ptr; } @@ -208,13 +208,13 @@ diff --git a/flist.c b/flist.c + } + fclose(fp); + -+ clean_flist(checksum_flist, 0); ++ flist_sort_and_clean(checksum_flist, 0); +} + int push_pathname(const char *dir, int len) { if (dir == pathname) -@@ -1005,7 +1186,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, +@@ -1003,7 +1184,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, STRUCT_STAT *stp, int flags, int filter_level) { static char *lastdir; @@ -223,7 +223,7 @@ diff --git a/flist.c b/flist.c struct file_struct *file; char thisname[MAXPATHLEN]; char linkname[MAXPATHLEN]; -@@ -1133,9 +1314,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, +@@ -1136,9 +1317,16 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, memcpy(lastdir, thisname, len); lastdir[len] = '\0'; lastdir_len = len; @@ -241,7 +241,7 @@ diff --git a/flist.c b/flist.c basename_len = strlen(basename) + 1; /* count the '\0' */ #ifdef SUPPORT_LINKS -@@ -1211,11 +1399,21 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, +@@ -1214,11 +1402,21 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, } #endif @@ -266,16 +266,13 @@ diff --git a/flist.c b/flist.c /* This code is only used by the receiver when it is building * a list of files for a delete pass. */ if (keep_dirlinks && linkname_len && flist) { -@@ -2079,7 +2277,11 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) +@@ -2074,7 +2272,8 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) * file-list to check if this is a 1-file xfer. */ send_extra_file_list(f, 1); } - } + } else + flist_eof = 1; -+ -+ if (checksum_updating && always_checksum && flist_eof) -+ read_checksums(NULL); return flist; }