diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-01-05 04:15:55 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2004-01-05 04:15:55 +0000 |
commit | 379368b0bec1f57cc5302b274362ce2f1df0fd9d (patch) | |
tree | 9b529bbf3e6764b22a95d04ce290796ded44c6df /source/lib/gencache.c | |
parent | da408e0d5aa29ca1505c2fd96b32deae9ed940c4 (diff) | |
download | samba-379368b0bec1f57cc5302b274362ce2f1df0fd9d.tar.gz samba-379368b0bec1f57cc5302b274362ce2f1df0fd9d.tar.xz samba-379368b0bec1f57cc5302b274362ce2f1df0fd9d.zip |
Always call the auto-init funciton - this avoids tdb segfaulting under
us if we failed to open it earlier.
Andrew Bartlett
Diffstat (limited to 'source/lib/gencache.c')
-rw-r--r-- | source/lib/gencache.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/lib/gencache.c b/source/lib/gencache.c index da8808af164..39e727c24fa 100644 --- a/source/lib/gencache.c +++ b/source/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; } |