]> git.sur5r.net Git - openldap/commitdiff
anticipate sr_err/sr_ref cross-check, so that the right error gets logged
authorPierangelo Masarati <ando@openldap.org>
Fri, 16 Dec 2005 11:33:11 +0000 (11:33 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 16 Dec 2005 11:33:11 +0000 (11:33 +0000)
servers/slapd/back-bdb/search.c

index 4dc16019e22857640f3c8d63c87fb688c061818f..df70a4357a08c6d824d96f8f2d9c57072ae2be1d 100644 (file)
@@ -465,7 +465,7 @@ dn2entry_retry:
 #endif
                        rs->sr_ref = referral_rewrite( default_referral,
                                NULL, &op->o_req_dn, op->oq_search.rs_scope );
-                       rs->sr_err = LDAP_REFERRAL;
+                       rs->sr_err = rs->sr_ref != NULL ? LDAP_REFERRAL : LDAP_NO_SUCH_OBJECT;
                }
 
                send_ldap_result( op, rs );