aboutsummaryrefslogtreecommitdiffstats
path: root/checksum.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-05-21 08:27:04 +0000
committerWayne Davison <wayned@samba.org>2004-05-21 08:27:04 +0000
commitba582f753a4c3eb2dd793904fb6a378ed8ffd90a (patch)
treeaeb10d3c67d6759c709e29c992104dafd3f3c88b /checksum.c
parentcbd85b472ec8c79449613e821c0952cd7e179deb (diff)
downloadandroid_external_rsync-ba582f753a4c3eb2dd793904fb6a378ed8ffd90a.tar.gz
android_external_rsync-ba582f753a4c3eb2dd793904fb6a378ed8ffd90a.tar.bz2
android_external_rsync-ba582f753a4c3eb2dd793904fb6a378ed8ffd90a.zip
Changed sum_init() to take a seed value as an arg instead of always
using checksum_init. This fixes an authentication problem in server mode (as pointed out by Craig Barratt).
Diffstat (limited to 'checksum.c')
-rw-r--r--checksum.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/checksum.c b/checksum.c
index 19bd6f15..ce30e724 100644
--- a/checksum.c
+++ b/checksum.c
@@ -135,13 +135,13 @@ static int sumresidue;
static char sumrbuf[CSUM_CHUNK];
static struct mdfour md;
-void sum_init(void)
+void sum_init(int seed)
{
char s[4];
mdfour_begin(&md);
- sumresidue=0;
- SIVAL(s,0,checksum_seed);
- sum_update(s,4);
+ sumresidue = 0;
+ SIVAL(s, 0, seed);
+ sum_update(s, 4);
}
/**