]> 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 620e2be92e7f2254aaa750456c00057b5ac15a9f..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_OTHER;
-               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;
                        }
 
@@ -690,7 +683,8 @@ meta_send_entry(
                 * everything pass thru the ldap backend.
                 */
                } else if ( attr->a_desc->ad_type->sat_syntax ==
-                               slap_schema.si_syn_distinguishedName ) {
+                               slap_schema.si_syn_distinguishedName )
+               {
                        ldap_dnattr_result_rewrite( &dc, attr->a_vals );
 
                } else if ( attr->a_desc == slap_schema.si_ad_ref ) {