]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-meta/search.c
Read config tree from back-ldif
[openldap] / servers / slapd / back-meta / search.c
index cd2c3f7bc6f34c00831d4df8b8b35145e32b0d90..3dbd522a8be9a3b305032280a155caaef129ed33 100644 (file)
@@ -71,16 +71,9 @@ meta_back_search( Operation *op, SlapReply *rs )
         * to map attrs and maybe rewrite value
         */
        lc = meta_back_getconn( op, rs, META_OP_ALLOW_MULTIPLE, 
-                       &op->o_req_ndn, NULL );
-       if ( !lc ) {
-               send_ldap_result( op, rs );
-               return -1;
-       }
-
-       if ( !meta_back_dobind( lc, op ) ) {
-               rs->sr_err = LDAP_UNAVAILABLE;
-               send_ldap_result( op, rs );
-               return -1;
+                       &op->o_req_ndn, NULL, LDAP_BACK_SENDERR );
+       if ( !lc || !meta_back_dobind( lc, op, LDAP_BACK_SENDERR ) ) {
+               return rs->sr_err;
        }
 
        /*
@@ -259,7 +252,7 @@ meta_back_search( Operation *op, SlapReply *rs )
                rc = ldap_search_ext( lsc->msc_ld,
                                mbase.bv_val, realscope, mfilter.bv_val,
                                mapped_attrs, op->ors_attrsonly,
-                               NULL, NULL,
+                               op->o_ctrls, NULL,
                                NULL, op->ors_slimit, &msgid[ i ] ); 
                if ( mapped_attrs ) {
                        free( mapped_attrs );
@@ -310,7 +303,7 @@ new_candidate:;
                        
                        if ( ab ) {
                                ldap_abandon_ext( lsc->msc_ld, msgid[ i ], NULL, NULL );
-                               rc = 0;
+                               rc = SLAPD_ABANDON;
                                break;
                        }