This is now on the trunk.
[rsync/rsync-patches.git] / early-checksum.diff
index d8e1f0d..1a84acc 100644 (file)
@@ -24,7 +24,7 @@ To use this patch, run these commands for a successful build:
  extern int module_id;
  extern int ignore_errors;
  extern int numeric_ids;
-@@ -859,6 +860,15 @@ static struct file_struct *recv_file_ent
+@@ -882,6 +883,15 @@ static struct file_struct *recv_file_ent
                        memcpy(bp, F_SUM(first), checksum_len);
                } else
                        read_buf(f, bp, checksum_len);
@@ -63,7 +63,7 @@ To use this patch, run these commands for a successful build:
 @@ -599,6 +601,8 @@ int unchanged_file(char *fn, struct file
           of the file time to determine whether to sync */
        if (always_checksum > 0 && S_ISREG(st->st_mode)) {
-               char sum[MD4_SUM_LENGTH];
+               char sum[MAX_DIGEST_LEN];
 +              if (pre_checksum && fnamecmp_type == FNAMECMP_FNAME)
 +                      return !(file->flags & FLAG_SUM_DIFFERS);
                file_checksum(fn, sum, st->st_size);