ldap/servers/slapd/back-ldbm/cache.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit bede5727775b3a9d470acc5941b2d6eca80bb79c
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Mon Oct 10 15:19:46 2011 -0700
Bug 744945 - nsslapd-counters attribute value cannot be set to "off"
https://bugzilla.redhat.com/show_bug.cgi?id=744945
Description: nsslapd-counters (cn=config) is allowed to have the
value "off". Once it's set, cache monitor would not be available.
. when staring the server, following message is logged.
cache_init: slapi counter is not available.
. ldapsearch cache statistics under cn=monitor,cn=<BACKEND>,cn=ldbm
database, cn=plugins,cn=config shows 0's:
entrycachehits: 0
entrycachetries: 0
entrycachehitratio: 0
diff --git a/ldap/servers/slapd/back-ldbm/cache.c b/ldap/servers/slapd/back-ldbm/cache.c
index ff9921a..3d09bb3 100644
--- a/ldap/servers/slapd/back-ldbm/cache.c
+++ b/ldap/servers/slapd/back-ldbm/cache.c
@@ -536,7 +536,9 @@ int cache_init(struct cache *cache, size_t maxsize, long maxentries,
int type)
} else {
LDAPDebug0Args(LDAP_DEBUG_ANY,
"cache_init: slapi counter is not available.\n");
- return 0;
+ cache->c_cursize = NULL;
+ cache->c_hits = NULL;
+ cache->c_tries = NULL;
}
cache->c_lruhead = cache->c_lrutail = NULL;
cache_make_hashes(cache, type);