mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-28 02:29:34 -05:00
ITS#6103 send cancelled response back to client
This commit is contained in:
parent
acfe724926
commit
2889cc9b1d
2 changed files with 8 additions and 4 deletions
|
|
@ -1126,7 +1126,7 @@ operations_error:
|
|||
}
|
||||
|
||||
if ( op->o_cancel == SLAP_CANCEL_REQ ) {
|
||||
if ( rc == SLAPD_ABANDON ) {
|
||||
if ( rc == SLAPD_ABANDON || rc == LDAP_CANCELLED ) {
|
||||
op->o_cancel = SLAP_CANCEL_ACK;
|
||||
} else {
|
||||
op->o_cancel = LDAP_TOO_LATE;
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ static long send_ldap_ber(
|
|||
|
||||
/* write only one pdu at a time - wait til it's our turn */
|
||||
ldap_pvt_thread_mutex_lock( &conn->c_write1_mutex );
|
||||
if ( op->o_abandon || connection_state_closing( conn )) {
|
||||
if (( op->o_abandon && !op->o_cancel ) || connection_state_closing( conn )) {
|
||||
ldap_pvt_thread_mutex_unlock( &conn->c_write1_mutex );
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -416,8 +416,12 @@ send_ldap_response(
|
|||
long bytes;
|
||||
|
||||
if ( rs->sr_err == SLAPD_ABANDON || op->o_abandon ) {
|
||||
rc = SLAPD_ABANDON;
|
||||
goto clean2;
|
||||
if ( op->o_cancel ) {
|
||||
rs->sr_err = LDAP_CANCELLED;
|
||||
} else {
|
||||
rc = SLAPD_ABANDON;
|
||||
goto clean2;
|
||||
}
|
||||
}
|
||||
|
||||
if ( op->o_callback ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue