From eb6dcbe246c585e8c7a88551988844db9dc0f040 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 21 Jun 2004 17:51:28 +0000 Subject: [PATCH] fix ITS#3196; more to do --- servers/slapd/limits.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ) ) -- 2.39.5