From: Jong Hyuk Choi Date: Mon, 31 May 2004 02:03:39 +0000 (+0000) Subject: Fix for backglue limit checking X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~313 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5e761b1ea3f86c18810bec70366d4734687dc92f;p=openldap Fix for backglue limit checking --- diff --git a/servers/slapd/backglue.c b/servers/slapd/backglue.c index 04d36ea608..c2d6217913 100644 --- a/servers/slapd/backglue.c +++ b/servers/slapd/backglue.c @@ -194,7 +194,7 @@ glue_back_response ( Operation *op, SlapReply *rs ) switch(rs->sr_type) { case REP_SEARCH: - if ( gs->slimit && rs->sr_nentries >= gs->slimit ) { + if ( gs->slimit != -1 && rs->sr_nentries >= gs->slimit ) { rs->sr_err = gs->err = LDAP_SIZELIMIT_EXCEEDED; return -1; } @@ -264,9 +264,7 @@ glue_back_search ( Operation *op, SlapReply *rs ) cb.sc_next = op->o_callback; - if (op->ors_tlimit) { - stoptime = slap_get_time () + op->ors_tlimit; - } + stoptime = slap_get_time () + op->ors_tlimit; switch (op->ors_scope) { case LDAP_SCOPE_BASE: @@ -312,14 +310,14 @@ glue_back_search ( Operation *op, SlapReply *rs ) for (i = gi->nodes-1; i >= 0; i--) { if (!gi->n[i].be || !gi->n[i].be->be_search) continue; - if (tlimit0) { + if (tlimit0 != -1) { op->ors_tlimit = stoptime - slap_get_time (); if (op->ors_tlimit <= 0) { rs->sr_err = gs.err = LDAP_TIMELIMIT_EXCEEDED; break; } } - if (slimit0) { + if (slimit0 != -1) { op->ors_slimit = slimit0 - rs->sr_nentries; if (op->ors_slimit < 0) { rs->sr_err = gs.err = LDAP_SIZELIMIT_EXCEEDED;