summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_cache.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-03-12 10:12:58 +0100
committerVolker Lendecke <vl@samba.org>2009-03-12 10:20:08 +0100
commitb17f9e15efcc5a826b07afa22c8321d2c653ae72 (patch)
tree80bf84dbee5dc5e7f853ebb5aecf06e43a427014 /source3/winbindd/winbindd_cache.c
parent483525f73c5597c0c35de4288d97f53b9d3d262e (diff)
downloadsamba-b17f9e15efcc5a826b07afa22c8321d2c653ae72.tar.gz
samba-b17f9e15efcc5a826b07afa22c8321d2c653ae72.tar.bz2
samba-b17f9e15efcc5a826b07afa22c8321d2c653ae72.zip
Make opt_nocache static to winbindd.c
Diffstat (limited to 'source3/winbindd/winbindd_cache.c')
-rw-r--r--source3/winbindd/winbindd_cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 02d0b5bc4e..66166bf292 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -34,7 +34,6 @@
#define WINBINDD_CACHE_VERSION_KEYSTR "WINBINDD_CACHE_VERSION"
extern struct winbindd_methods reconnect_methods;
-extern bool opt_nocache;
#ifdef HAVE_ADS
extern struct winbindd_methods ads_methods;
#endif
@@ -632,7 +631,7 @@ static struct cache_entry *wcache_fetch(struct winbind_cache *cache,
char *kstr;
struct cache_entry *centry;
- if (opt_nocache) {
+ if (!winbindd_use_cache()) {
return NULL;
}
@@ -834,7 +833,7 @@ static void centry_end(struct cache_entry *centry, const char *format, ...)
char *kstr;
TDB_DATA key, data;
- if (opt_nocache) {
+ if (!winbindd_use_cache()) {
return;
}
@@ -2861,8 +2860,9 @@ void wcache_flush_cache(void)
tdb_close(wcache->tdb);
wcache->tdb = NULL;
}
- if (opt_nocache)
+ if (!winbindd_use_cache()) {
return;
+ }
/* when working offline we must not clear the cache on restart */
wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"),