From 870105d74fe814ae839ee4962d00381e78fbef20 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 6 Jan 2004 01:15:13 +0000 Subject: (merge from 3.0) Always call the auto-init funciton - this avoids tdb segfaulting under us if we failed to open it earlier. Andrew Bartlett (This used to be commit 34f16eaeaa81a0cc6ae564f4be8a02752ee5624d) --- source3/lib/gencache.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c index da8808af16..39e727c24f 100644 --- a/source3/lib/gencache.c +++ b/source3/lib/gencache.c @@ -357,6 +357,9 @@ void gencache_iterate(void (*fn)(const char* key, const char *value, time_t time int gencache_lock_entry( const char *key ) { + if (!gencache_init()) + return -1; + return tdb_lock_bystring(cache, key, 0); } @@ -366,6 +369,9 @@ int gencache_lock_entry( const char *key ) void gencache_unlock_entry( const char *key ) { + if (!gencache_init()) + return; + tdb_unlock_bystring(cache, key); return; } -- cgit