From b86830a7cd2e0233e34358f829fa186233194976 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 5 Jan 2004 04:15:55 +0000 Subject: 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 379368b0bec1f57cc5302b274362ce2f1df0fd9d) --- source3/lib/gencache.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3') 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