From: Pierangelo Masarati Date: Fri, 14 Aug 2009 00:03:10 +0000 (+0000) Subject: honor sizelimit when filter needs to be split between local and remote (ITS#6253) X-Git-Tag: ACLCHECK_0~336 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bea861dda55f571e44d808080eebea36ea56ca6a;p=openldap honor sizelimit when filter needs to be split between local and remote (ITS#6253) --- diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c index 102b909418..6641de2838 100644 --- a/servers/slapd/overlays/translucent.c +++ b/servers/slapd/overlays/translucent.c @@ -769,6 +769,7 @@ typedef struct trans_ctx { Filter *orig; Avlnode *list; int step; + int slimit; } trans_ctx; static int translucent_search_cb(Operation *op, SlapReply *rs) { @@ -793,6 +794,8 @@ static int translucent_search_cb(Operation *op, SlapReply *rs) { Debug(LDAP_DEBUG_TRACE, "==> translucent_search_cb: %s\n", rs->sr_entry->e_name.bv_val, 0, 0); + op->ors_slimit = tc->slimit; + on = tc->on; ov = on->on_bi.bi_private; @@ -1098,6 +1101,8 @@ static int translucent_search(Operation *op, SlapReply *rs) { if ( fr || !fl ) { AttributeName *attrs = op->ors_attrs; + tc.slimit = op->ors_slimit; + op->ors_slimit = SLAP_NO_LIMIT; op->ors_attrs = NULL; op->o_bd = &ov->db; tc.step |= RMT_SIDE; @@ -1107,6 +1112,7 @@ static int translucent_search(Operation *op, SlapReply *rs) { filter2bv_x( op, fr, &op->ors_filterstr ); } rc = ov->db.bd_info->bi_op_search(op, rs); + op->ors_slimit = tc.slimit; op->ors_attrs = attrs; op->o_bd = tc.db; if ( fl ) {