summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-01-06 01:15:13 +0000
committerAndrew Bartlett <abartlet@samba.org>2004-01-06 01:15:13 +0000
commit870105d74fe814ae839ee4962d00381e78fbef20 (patch)
treea6b85ee035635353331e88b4762f100bf7d018d9 /source3/lib
parent06843fdee216a8b40fd44377f520a5c2345b0382 (diff)
downloadsamba-870105d74fe814ae839ee4962d00381e78fbef20.tar.gz
samba-870105d74fe814ae839ee4962d00381e78fbef20.tar.bz2
samba-870105d74fe814ae839ee4962d00381e78fbef20.zip
(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)
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;
}