Partially revert prev commit, leave rs->sr_err == SLAPD_ABANDON

This commit is contained in:
Howard Chu 2009-05-11 04:23:51 +00:00
parent 2889cc9b1d
commit 9767c87531
2 changed files with 10 additions and 10 deletions

View file

@ -1126,7 +1126,7 @@ operations_error:
}
if ( op->o_cancel == SLAP_CANCEL_REQ ) {
if ( rc == SLAPD_ABANDON || rc == LDAP_CANCELLED ) {
if ( rc == SLAPD_ABANDON ) {
op->o_cancel = SLAP_CANCEL_ACK;
} else {
op->o_cancel = LDAP_TOO_LATE;

View file

@ -415,13 +415,9 @@ send_ldap_response(
int rc = LDAP_SUCCESS;
long bytes;
if ( rs->sr_err == SLAPD_ABANDON || op->o_abandon ) {
if ( op->o_cancel ) {
rs->sr_err = LDAP_CANCELLED;
} else {
rc = SLAPD_ABANDON;
goto clean2;
}
if (( rs->sr_err == SLAPD_ABANDON || op->o_abandon ) && !op->o_cancel ) {
rc = SLAPD_ABANDON;
goto clean2;
}
if ( op->o_callback ) {
@ -441,9 +437,13 @@ send_ldap_response(
ber_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
}
rc = rs->sr_err;
if ( rc == SLAPD_ABANDON && op->o_cancel )
rc = LDAP_CANCELLED;
Debug( LDAP_DEBUG_TRACE,
"send_ldap_response: msgid=%d tag=%lu err=%d\n",
rs->sr_msgid, rs->sr_tag, rs->sr_err );
rs->sr_msgid, rs->sr_tag, rc );
if( rs->sr_ref ) {
Debug( LDAP_DEBUG_ARGS, "send_ldap_response: ref=\"%s\"\n",
@ -467,7 +467,7 @@ send_ldap_response(
} else {
rc = ber_printf( ber, "{it{ess" /*"}}"*/,
rs->sr_msgid, rs->sr_tag, rs->sr_err,
rs->sr_msgid, rs->sr_tag, rc,
rs->sr_matched == NULL ? "" : rs->sr_matched,
rs->sr_text == NULL ? "" : rs->sr_text );
}