summaryrefslogtreecommitdiff
path: root/source3/smbd/statcache.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-08-30 20:19:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:32 -0500
commitf1688d61df13aacb0e512fd16504cc94f803d808 (patch)
treef1ef23d5a2f5a323b241909181861e6ab111a622 /source3/smbd/statcache.c
parent58a146033012183f44a045b6c6a35c7c74dbf7dd (diff)
downloadsamba-f1688d61df13aacb0e512fd16504cc94f803d808.tar.gz
samba-f1688d61df13aacb0e512fd16504cc94f803d808.tar.bz2
samba-f1688d61df13aacb0e512fd16504cc94f803d808.zip
r2112: Simplify the mangle hash code to use an in-memory tdb.
Should be ready for the new directory code now... Jeremy. (This used to be commit c2eff8ef1b65570d2e590f62f026cc18f9142652)
Diffstat (limited to 'source3/smbd/statcache.c')
-rw-r--r--source3/smbd/statcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c
index dfc1a6ed95..03adf32e09 100644
--- a/source3/smbd/statcache.c
+++ b/source3/smbd/statcache.c
@@ -286,7 +286,7 @@ BOOL stat_cache_lookup(connection_struct *conn, pstring name, pstring dirpath,
JRA. Use a djb-algorithm hash for speed.
***************************************************************/
-static u32 string_hash(TDB_DATA *key)
+u32 fast_string_hash(TDB_DATA *key)
{
u32 n = 0;
const char *p;
@@ -311,7 +311,7 @@ BOOL reset_stat_cache( void )
/* Create the in-memory tdb using our custom hash function. */
tdb_stat_cache = tdb_open_ex("statcache", 0, TDB_INTERNAL,
- (O_RDWR|O_CREAT), 0644, NULL, string_hash);
+ (O_RDWR|O_CREAT), 0644, NULL, fast_string_hash);
if (!tdb_stat_cache)
return False;