From dfe20afd84816562b58bcdccafcbf325e7b1eb21 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sat, 10 Jun 2006 10:31:17 +0000 Subject: [PATCH] Fix glue_back_select() behaviour so that it actually does select the most specific backend for the DN (this was broken in the case that subordinate and subsubordinate backends were glued) --- servers/slapd/backglue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/servers/slapd/backglue.c b/servers/slapd/backglue.c index 202c63cd9d..83cab67b52 100644 --- a/servers/slapd/backglue.c +++ b/servers/slapd/backglue.c @@ -65,7 +65,7 @@ glue_back_select ( glueinfo *gi = (glueinfo *)on->on_bi.bi_private; int i; - for (i = 0; igi_nodes; i++) { + for (i = gi->gi_nodes-1; i >= 0; i--) { assert( gi->gi_n[i].gn_be->be_nsuffix != NULL ); if (dnIsSuffix(dn, &gi->gi_n[i].gn_be->be_nsuffix[0])) { @@ -333,7 +333,7 @@ glue_op_search ( Operation *op, SlapReply *rs ) b1 = op->o_bd; /* - * Execute in reverse order, most general first + * Execute in reverse order, most specific first */ for (i = gi->gi_nodes; i >= 0; i--) { if ( i == gi->gi_nodes ) { @@ -347,6 +347,7 @@ glue_op_search ( Operation *op, SlapReply *rs ) continue; if (!dnIsSuffix(&btmp->be_nsuffix[0], &b1->be_nsuffix[0])) continue; + if (tlimit0 != SLAP_NO_LIMIT) { op->o_time = slap_get_time(); op->ors_tlimit = stoptime - op->o_time; -- 2.39.5