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:
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,
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 );
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;