summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-15 09:30:22 +0100
committerJeremy Allison <jra@samba.org>2011-03-16 01:15:41 +0100
commit831ff4519e5e30752cab814a5d06008942a1fd58 (patch)
treeffdb2f1005e49fdc712e6a107fc409eea4b1e876 /source3
parent73e7b72936e966b0f1887ffe4c32689425d4a87a (diff)
downloadsamba-831ff4519e5e30752cab814a5d06008942a1fd58.tar.gz
samba-831ff4519e5e30752cab814a5d06008942a1fd58.tar.bz2
samba-831ff4519e5e30752cab814a5d06008942a1fd58.zip
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@samba.org> Autobuild-Date: Wed Mar 16 01:15:41 CET 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 81d2a78d3c..b6128feaf6 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);
}
/*****************************************************************