From: Pierangelo Masarati Date: Mon, 21 Jun 2004 17:51:28 +0000 (+0000) Subject: fix ITS#3196; more to do X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~202 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=eb6dcbe246c585e8c7a88551988844db9dc0f040;p=openldap fix ITS#3196; more to do --- diff --git a/servers/slapd/limits.c b/servers/slapd/limits.c index 0c62a25baa..ef483183ff 100644 --- a/servers/slapd/limits.c +++ b/servers/slapd/limits.c @@ -1102,7 +1102,12 @@ limits_check( Operation *op, SlapReply *rs ) } if ( pr_total == -1 ) { - slimit = -1; + if ( op->ors_slimit == 0 || op->ors_slimit == SLAP_MAX_LIMIT ) { + slimit = -1; + + } else { + slimit = op->ors_slimit - op->o_pagedresults_state.ps_count; + } } else if ( pr_total > 0 && op->ors_slimit != SLAP_MAX_LIMIT && ( op->ors_slimit == SLAP_NO_LIMIT || op->ors_slimit > pr_total ) )