]> git.sur5r.net Git - openldap/commitdiff
re-fix ITS#5916
authorPierangelo Masarati <ando@openldap.org>
Fri, 20 Feb 2009 01:07:00 +0000 (01:07 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 20 Feb 2009 01:07:00 +0000 (01:07 +0000)
libraries/libldap/search.c

index 7dfdbd16c37d855b329d933a804bdd0bd3f60106..5c4e234e72395392130014ed21832d9329ad101d 100644 (file)
@@ -315,7 +315,8 @@ ldap_build_search_req(
 #endif
        {
            err = ber_printf( ber, "{it{seeiib", *idp,
-               LDAP_REQ_SEARCH, base, (ber_int_t) scope, ld->ld_deref,
+               LDAP_REQ_SEARCH, base, (ber_int_t) scope,
+               (deref < 0) ? ld->ld_deref : deref,
                (sizelimit < 0) ? ld->ld_sizelimit : sizelimit,
                (timelimit < 0) ? ld->ld_timelimit : timelimit,
                attrsonly );