]> git.sur5r.net Git - openldap/commitdiff
improve previous fix; return LDAP_REFERRAL to avoid returning result multiple times
authorPierangelo Masarati <ando@openldap.org>
Fri, 8 Apr 2005 21:58:58 +0000 (21:58 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 8 Apr 2005 21:58:58 +0000 (21:58 +0000)
servers/slapd/back-dnssrv/referral.c

index 6a3abcd69d2674619bc6c48ea2d721efaa56cb2f..c22282eb3ae871dd3bd1e214a28b8b82247a2b5a 100644 (file)
@@ -67,6 +67,7 @@ dnssrv_back_referrals(
                rs->sr_err = LDAP_REFERRAL;
                rs->sr_ref = default_referral;
                send_ldap_result( op, rs );
+               rs->sr_ref = NULL;
                return LDAP_REFERRAL;
        }
 
@@ -124,5 +125,5 @@ done:
        if( hostlist != NULL ) ch_free( hostlist );
        if( hosts != NULL ) ldap_charray_free( hosts );
        ber_bvarray_free( urls );
-       return rc;
+       return rs->sr_err;
 }