]> git.sur5r.net Git - openldap/commitdiff
Fix - put group cache search after backend has been selected
authorHoward Chu <hyc@openldap.org>
Mon, 12 Nov 2001 21:39:55 +0000 (21:39 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 12 Nov 2001 21:39:55 +0000 (21:39 +0000)
servers/slapd/backend.c

index f1216f410a3f9bc576d55482cc892a566cd7c3c9..feac0e595d5df64946a5cdb87391df2519f73d98 100644 (file)
@@ -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,