From: Quanah Gibson-Mount Date: Thu, 19 Feb 2009 01:28:24 +0000 (+0000) Subject: Final bits for ITS#5927 X-Git-Tag: OPENLDAP_REL_ENG_2_4_15~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9826599834f6f8497f0249fca395e07eda733bd3;p=openldap Final bits for ITS#5927 --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index f3cc1df54d..ad35eaef60 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -1976,7 +1976,7 @@ pcache_op_cleanup( Operation *op, SlapReply *rs ) { Entry *e; /* don't return more entries than requested by the client */ - if ( si->slimit && rs->sr_nentries >= si->slimit ) { + if ( si->slimit > 0 && rs->sr_nentries >= si->slimit ) { si->slimit_exceeded = 1; } @@ -2460,7 +2460,7 @@ pcache_op_search( si->slimit = 0; si->slimit_exceeded = 0; si->caching_reason = PC_IGNORE; - if ( op->ors_slimit && op->ors_slimit < cm->num_entries_limit ) { + if ( op->ors_slimit > 0 && op->ors_slimit < cm->num_entries_limit ) { si->slimit = op->ors_slimit; op->ors_slimit = cm->num_entries_limit; }