From: Hallvard Furuseth Date: Mon, 11 Feb 2008 20:59:40 +0000 (+0000) Subject: ITS#5328 - do not send errors (other than referral) from be->be_chk_referrals() X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~165 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=01ec3c64ea4fce281b6021e7dc6c378f5c5bf753;p=openldap ITS#5328 - do not send errors (other than referral) from be->be_chk_referrals() --- diff --git a/servers/slapd/back-bdb/referral.c b/servers/slapd/back-bdb/referral.c index 97d7e1176a..b2b2c68f5b 100644 --- a/servers/slapd/back-bdb/referral.c +++ b/servers/slapd/back-bdb/referral.c @@ -65,8 +65,8 @@ dn2entry_retry: case 0: break; case LDAP_BUSY: - send_ldap_error( op, rs, LDAP_BUSY, "ldap server busy" ); LOCK_ID_FREE ( bdb->bi_dbenv, locker ); + rs->sr_text = "ldap server busy"; return LDAP_BUSY; case DB_LOCK_DEADLOCK: case DB_LOCK_NOTGRANTED: @@ -76,13 +76,13 @@ dn2entry_retry: LDAP_XSTRING(bdb_referrals) ": dn2entry failed: %s (%d)\n", db_strerror(rc), rc, 0 ); - send_ldap_error( op, rs, LDAP_OTHER, "internal error" ); LOCK_ID_FREE ( bdb->bi_dbenv, locker ); - return rs->sr_err; + rs->sr_text = "internal error"; + return LDAP_OTHER; } if ( rc == DB_NOTFOUND ) { - rc = 0; + rc = LDAP_SUCCESS; rs->sr_matched = NULL; if ( e != NULL ) { Debug( LDAP_DEBUG_TRACE, @@ -117,9 +117,7 @@ dn2entry_retry: ber_bvarray_free( rs->sr_ref ); rs->sr_ref = NULL; } else if ( rc != LDAP_SUCCESS ) { - rs->sr_err = rc; rs->sr_text = rs->sr_matched ? "bad referral object" : NULL; - send_ldap_result( op, rs ); } LOCK_ID_FREE ( bdb->bi_dbenv, locker ); @@ -148,8 +146,8 @@ dn2entry_retry: ber_bvarray_free( rs->sr_ref ); rs->sr_ref = NULL; } else { - send_ldap_error( op, rs, LDAP_OTHER, "bad referral object" ); - rc = rs->sr_err; + rc = LDAP_OTHER; + rs->sr_text = "bad referral object"; } rs->sr_matched = NULL;