From 4f5824cf9b80dede79a6eddbcbb48f4ac75e5de4 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 2 Nov 2010 07:46:13 -0400 Subject: Properly document ldap_purge_cache_timeout Also allow it to be disabled entirely --- src/providers/ldap/ldap_common.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/providers/ldap') diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c index 16693a4e3..5de3d554b 100644 --- a/src/providers/ldap/ldap_common.c +++ b/src/providers/ldap/ldap_common.c @@ -398,6 +398,7 @@ int sdap_id_setup_tasks(struct sdap_id_ctx *ctx) { struct timeval tv; int ret = EOK; + int delay; /* set up enumeration task */ if (ctx->be->domain->enumerate) { @@ -407,7 +408,14 @@ int sdap_id_setup_tasks(struct sdap_id_ctx *ctx) ret = ldap_id_enumerate_set_timer(ctx, tv); } else { /* the enumeration task, runs the cleanup process by itself, - * but if enumeration is not runnig we need to schedule it */ + * but if enumeration is not running we need to schedule it */ + delay = dp_opt_get_int(ctx->opts->basic, SDAP_CACHE_PURGE_TIMEOUT); + if (delay == 0) { + /* Cleanup has been explicitly disabled, so we won't + * schedule any cleanup tasks. + */ + return EOK; + } /* run the first one in a couple of seconds so that we have time to * finish initializations first*/ -- cgit