From: Howard Chu Date: Wed, 19 Jan 2005 08:48:13 +0000 (+0000) Subject: Fix prev commit X-Git-Tag: OPENLDAP_REL_ENG_2_3_BP~338 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f8dfe108758553a2b3d4fc568b00670a7f2fde52;p=openldap Fix prev commit --- diff --git a/servers/slapd/back-ldbm/referral.c b/servers/slapd/back-ldbm/referral.c index 1483829620..8c1e8a4088 100644 --- a/servers/slapd/back-ldbm/referral.c +++ b/servers/slapd/back-ldbm/referral.c @@ -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 );