mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
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 379368b0be
)
This commit is contained in:
parent
425699fce7
commit
b86830a7cd
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user