From: Pierangelo Masarati Date: Wed, 23 Nov 2005 09:35:44 +0000 (+0000) Subject: "relax" previous commit; don't leave locks 'round (ITS#4204) X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~732 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=59c4fb1fcde1ac3ca18f97db6c6c7997b8fec2fa;p=openldap "relax" previous commit; don't leave locks 'round (ITS#4204) --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index f906a02567..ed8217eb40 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -733,6 +733,7 @@ static void cache_replacement(query_manager* qm, struct berval *result) Debug ( LDAP_DEBUG_ANY, "Cache replacement invoked without " "any query in LRU list\n", 0, 0, 0 ); + ldap_pvt_thread_mutex_unlock(&qm->lru_mutex); return; } @@ -1851,7 +1852,7 @@ pc_cf_gen( ConfigArgs *c ) Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 ); return( 1 ); } - if ( cm->num_entries_limit >= cm->max_entries ) { + if ( cm->num_entries_limit > cm->max_entries ) { snprintf( c->msg, sizeof( c->msg ), "entry limit (arg #4) must be less than max entries %d (arg #2)", cm->max_entries ); Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 ); return( 1 );