From 902f03d101aa3912986d2505b20e3e3e8bb9aca9 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 10 Nov 2005 06:01:55 +0000 Subject: [PATCH] In make_file(), only compute the checksum when we're the sender. This stops computing useless checksums during the delete scan when --checksum (-c) was specified. --- flist.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flist.c b/flist.c index 3e7481f3..a24c1176 100644 --- a/flist.c +++ b/flist.c @@ -820,7 +820,7 @@ struct file_struct *make_file(char *fname, struct file_list *flist, return NULL; } -skip_filters: + skip_filters: if (verbose > 2) { rprintf(FINFO, "[%s] make_file(%s,*,%d)\n", @@ -848,7 +848,8 @@ skip_filters: linkname_len = 0; #endif - sum_len = always_checksum && S_ISREG(st.st_mode) ? MD4_SUM_LENGTH : 0; + sum_len = always_checksum && am_sender && S_ISREG(st.st_mode) + ? MD4_SUM_LENGTH : 0; alloc_len = file_struct_len + dirname_len + basename_len + linkname_len + sum_len; -- 2.34.1