]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit
authorHoward Chu <hyc@openldap.org>
Wed, 19 Jan 2005 08:48:13 +0000 (08:48 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 19 Jan 2005 08:48:13 +0000 (08:48 +0000)
servers/slapd/back-ldbm/referral.c

index 14838296209fa03101d31bf477c762e7f7d649cf..8c1e8a40882cfce264a2d4c44a9d7e9851f57636 100644 (file)
@@ -64,6 +64,7 @@ ldbm_back_referrals(
                        cache_return_entry_r( &li->li_cache, matched );
 
                } else if ( default_referral != NULL ) {
+                       rc = rs->sr_err = LDAP_OTHER;
                        rs->sr_ref = referral_rewrite( default_referral,
                                NULL, &op->o_req_dn, LDAP_SCOPE_DEFAULT );
                }
@@ -78,7 +79,9 @@ ldbm_back_referrals(
                        rs->sr_text = rs->sr_matched ? "bad referral object" : "bad default referral";
                }
 
-               send_ldap_result( op, rs );
+               if ( rc != LDAP_SUCCESS ) {
+                       send_ldap_result( op, rs );
+               }
 
                if ( rs->sr_matched ) free( (char *)rs->sr_matched );
                if ( rs->sr_ref ) ber_bvarray_free( rs->sr_ref );