[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Tue Mar 15 18:16:01 MDT 2011
The branch, master has been updated
via 831ff45 s3: Use jenkins hash for str_checksum, fix bug 8010
from 73e7b72 libcli: openchange doesn't need these headers any more
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 831ff4519e5e30752cab814a5d06008942a1fd58
Author: Volker Lendecke <vl at samba.org>
Date: Tue Mar 15 09:30:22 2011 +0100
s3: Use jenkins hash for str_checksum, fix bug 8010
From the bugreport:
I have a folder with ~90 photos: IMG_XXXX.JPG where XXXX is a four digit
number, almost consecutive (photos from camera for one day).
Current implementation gives about 30 different checksums for this set of
files.
Autobuild-User: Jeremy Allison <jra at samba.org>
Autobuild-Date: Wed Mar 16 01:15:41 CET 2011 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source3/lib/util.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 81d2a78..b6128fe 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1899,17 +1899,8 @@ const char *tab_depth(int level, int depth)
int str_checksum(const char *s)
{
- int res = 0;
- int c;
- int i=0;
-
- while(*s) {
- c = *s;
- res ^= (c << (i % 15)) ^ (c >> (15-(i%15)));
- s++;
- i++;
- }
- return(res);
+ TDB_DATA key = string_tdb_data(s);
+ return tdb_jenkins_hash(&key);
}
/*****************************************************************
--
Samba Shared Repository
More information about the samba-cvs
mailing list