mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 17:19:43 -05:00
Operation abandon related fixes
This commit is contained in:
parent
5c1245de06
commit
2ba833680f
2 changed files with 14 additions and 1 deletions
|
|
@ -71,6 +71,8 @@ request_abandon( LloadConnection *c, LloadOperation *op )
|
|||
c->c_state = LLOAD_C_READY;
|
||||
}
|
||||
|
||||
/* operation_abandon requires a reference since it is passed with c unlocked */
|
||||
request->o_client_refcnt++;
|
||||
CONNECTION_UNLOCK_INCREF(c);
|
||||
operation_abandon( request );
|
||||
CONNECTION_LOCK_DECREF(c);
|
||||
|
|
|
|||
|
|
@ -578,7 +578,9 @@ done:
|
|||
* sends an abandon request.
|
||||
*
|
||||
* Being called from client_reset or request_abandon, the following hold:
|
||||
* - op->o_client_refcnt > 0 (and it follows that op->o_client != NULL)
|
||||
* - noone else is processing the read part of the client connection (no new
|
||||
* operations come in there - relevant for the c_state checks)
|
||||
* - op->o_client_refcnt > op->o_client_live (and it follows that op->o_client != NULL)
|
||||
*/
|
||||
void
|
||||
operation_abandon( LloadOperation *op )
|
||||
|
|
@ -649,10 +651,19 @@ done:
|
|||
CONNECTION_LOCK(c);
|
||||
if ( c->c_state == LLOAD_C_BINDING ) {
|
||||
c->c_state = LLOAD_C_READY;
|
||||
if ( !BER_BVISNULL( &c->c_auth ) ) {
|
||||
ber_memfree( c->c_auth.bv_val );
|
||||
BER_BVZERO( &c->c_auth );
|
||||
}
|
||||
if ( !BER_BVISNULL( &c->c_sasl_bind_mech ) ) {
|
||||
ber_memfree( c->c_sasl_bind_mech.bv_val );
|
||||
BER_BVZERO( &c->c_sasl_bind_mech );
|
||||
}
|
||||
if ( op->o_pin_id ) {
|
||||
c->c_pin_id = 0;
|
||||
}
|
||||
}
|
||||
assert( op->o_client_refcnt > op->o_client_live );
|
||||
op->o_client_refcnt--;
|
||||
operation_destroy_from_client( op );
|
||||
CONNECTION_UNLOCK(c);
|
||||
|
|
|
|||
Loading…
Reference in a new issue