git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a63bed
)
(merge from 3.0)
author
Andrew Bartlett
<abartlet@samba.org>
Tue, 6 Jan 2004 01:15:13 +0000
(
01:15
+0000)
committer
Andrew Bartlett
<abartlet@samba.org>
Tue, 6 Jan 2004 01:15:13 +0000
(
01:15
+0000)
Always call the auto-init funciton - this avoids tdb segfaulting under
us if we failed to open it earlier.
Andrew Bartlett
source/lib/gencache.c
patch
|
blob
|
history
diff --git
a/source/lib/gencache.c
b/source/lib/gencache.c
index da8808af1640d2d07d9ba48c3965749bc9d5c606..39e727c24fab0f9ff66184c2dff2dfd84ff28846 100644
(file)
--- 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;
}