From: Howard Chu Date: Mon, 12 Nov 2001 21:39:55 +0000 (+0000) Subject: Fix - put group cache search after backend has been selected X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~873 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=52d3f7b3da6aa75463008cf43a80ff43c6dd16f3;p=openldap Fix - put group cache search after backend has been selected --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index f1216f410a..feac0e595d 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -963,6 +963,16 @@ backend_group( if (i) return SLAPD_ABANDON; + if( strcmp( target->e_ndn, gr_ndn ) != 0 ) { + /* we won't attempt to send it to a different backend */ + + be = select_backend(gr_ndn, 0); + + if (be == NULL) { + return LDAP_NO_SUCH_OBJECT; + } + } + ldap_pvt_thread_mutex_lock( &conn->c_mutex ); for (g = conn->c_groups; g; g=g->next) { if (g->be != be || g->oc != group_oc || g->at != group_at || @@ -975,16 +985,6 @@ backend_group( if (g) return g->res; - if( strcmp( target->e_ndn, gr_ndn ) != 0 ) { - /* we won't attempt to send it to a different backend */ - - be = select_backend(gr_ndn, 0); - - if (be == NULL) { - return LDAP_NO_SUCH_OBJECT; - } - } - if( be->be_group ) { int res = be->be_group( be, conn, op, target, gr_ndn, op_ndn,