diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2009-11-05 11:23:06 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-11-05 14:55:19 -0500 |
commit | ea95b9ecd144423cd70d3790c97a3e7277fa9d02 (patch) | |
tree | 103b52ab87764511a2f1539726c64b3f1675fd1f /server/responder/nss/nsssrv.c | |
parent | 198e04f81f26c051037817241918178c01803f52 (diff) | |
download | sssd-ea95b9ecd144423cd70d3790c97a3e7277fa9d02.tar.gz sssd-ea95b9ecd144423cd70d3790c97a3e7277fa9d02.tar.bz2 sssd-ea95b9ecd144423cd70d3790c97a3e7277fa9d02.zip |
Update midpoint refresh logic to be relative to cache timeout
Diffstat (limited to 'server/responder/nss/nsssrv.c')
-rw-r--r-- | server/responder/nss/nsssrv.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/server/responder/nss/nsssrv.c b/server/responder/nss/nsssrv.c index 272cd38b..dad1c7c1 100644 --- a/server/responder/nss/nsssrv.c +++ b/server/responder/nss/nsssrv.c @@ -103,13 +103,14 @@ static int nss_get_config(struct nss_ctx *nctx, ret = confdb_get_int(cdb, nctx, CONFDB_NSS_CONF_ENTRY, - CONFDB_NSS_ENTRY_CACHE_NOWAIT_TIMEOUT, 0, - &nctx->cache_refresh_timeout); + CONFDB_NSS_ENTRY_CACHE_NOWAIT_PERCENTAGE, 0, + &nctx->cache_refresh_percent); if (ret != EOK) goto done; - if (nctx->cache_refresh_timeout < 0) { - DEBUG(0,("Configuration error: EntryCacheNoWaitRefreshTimeout is" + if (nctx->cache_refresh_percent < 0 || + nctx->cache_refresh_percent > 99) { + DEBUG(0,("Configuration error: entry_cache_nowait_percentage is" "invalid. Disabling feature.\n")); - nctx->cache_refresh_timeout = 0; + nctx->cache_refresh_percent = 0; } ret = confdb_get_string_as_list(cdb, tmpctx, CONFDB_NSS_CONF_ENTRY, |