summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-01-05 04:15:55 +0000
committerAndrew Bartlett <abartlet@samba.org>2004-01-05 04:15:55 +0000
commitb86830a7cd2e0233e34358f829fa186233194976 (patch)
tree635209549e4f13f02f436db050acc0fdd99ef9da /source3/lib
parent425699fce728a3d302a3e5288d0c59ec7b16aee2 (diff)
downloadsamba-b86830a7cd2e0233e34358f829fa186233194976.tar.gz
samba-b86830a7cd2e0233e34358f829fa186233194976.tar.bz2
samba-b86830a7cd2e0233e34358f829fa186233194976.zip
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)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/gencache.c6
1 files changed, 6 insertions, 0 deletions
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;
}