]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/search.c
Reverse last commit. Wrong tree.
[openldap] / servers / slapd / back-ldap / search.c
index 2be811f1faad92907173adf33d03a4849e0690d2..cdb9c581ee8347882b4f72433de59311fe65750e 100644 (file)
@@ -209,7 +209,7 @@ ldap_back_search(
        /* deal with <draft-zeilenga-ldap-t-f> filters */
        filter = op->ors_filterstr;
 retry:
-       rs->sr_err = ldap_search_ext( lc->lc_ld, op->o_req_ndn.bv_val,
+       rs->sr_err = ldap_search_ext( lc->lc_ld, op->o_req_dn.bv_val,
                        op->ors_scope, filter.bv_val,
                        attrs, op->ors_attrsonly, ctrls, NULL,
                        tv.tv_sec ? &tv : NULL,
@@ -303,6 +303,7 @@ retry:
                                rs->sr_attrs = op->ors_attrs;
                                rs->sr_operational_attrs = NULL;
                                rs->sr_flags = 0;
+                               rs->sr_err = LDAP_SUCCESS;
                                rc = rs->sr_err = send_search_entry( op, rs );
                                if ( !BER_BVISNULL( &ent.e_name ) ) {
                                        assert( ent.e_name.bv_val != bdn.bv_val );
@@ -412,22 +413,10 @@ retry:
                        }
 
                        if ( match.bv_val != NULL ) {
-#ifndef LDAP_NULL_IS_NULL
-                               if ( match.bv_val[ 0 ] == '\0' ) {
-                                       LDAP_FREE( match.bv_val );
-                                       BER_BVZERO( &match );
-                               } else
-#endif /* LDAP_NULL_IS_NULL */
                                {
                                        match.bv_len = strlen( match.bv_val );
                                }
                        }
-#ifndef LDAP_NULL_IS_NULL
-                       if ( rs->sr_text != NULL && rs->sr_text[ 0 ] == '\0' ) {
-                               LDAP_FREE( (char *)rs->sr_text );
-                               rs->sr_text = NULL;
-                       }
-#endif /* LDAP_NULL_IS_NULL */
 
                        /* cleanup */
                        if ( references ) {