mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-06 15:10:22 -05:00
Remember and clear bind status correctly
This commit is contained in:
parent
05f2ac2583
commit
af7ce80c85
1 changed files with 15 additions and 4 deletions
|
|
@ -315,6 +315,9 @@ client_bind( Connection *client, Operation *op )
|
|||
client->c_type = SLAP_C_OPEN;
|
||||
|
||||
client_reset( client );
|
||||
|
||||
rc = tavl_insert( &client->c_ops, op, operation_client_cmp, avl_dup_error );
|
||||
assert( rc == LDAP_SUCCESS );
|
||||
CONNECTION_UNLOCK_INCREF(client);
|
||||
|
||||
upstream = backend_select( op );
|
||||
|
|
@ -355,10 +358,18 @@ client_bind( Connection *client, Operation *op )
|
|||
|
||||
if ( !--op->o_client_refcnt ) {
|
||||
operation_destroy_from_client( op );
|
||||
} else {
|
||||
rc = tavl_insert(
|
||||
&client->c_ops, op, operation_client_cmp, avl_dup_error );
|
||||
assert( rc == LDAP_SUCCESS );
|
||||
if ( client->c_state == SLAP_C_BINDING ) {
|
||||
client->c_state = SLAP_C_READY;
|
||||
client->c_type = SLAP_C_OPEN;
|
||||
if ( !BER_BVISNULL( &client->c_auth ) ) {
|
||||
ber_memfree( client->c_auth.bv_val );
|
||||
BER_BVZERO( &client->c_auth );
|
||||
}
|
||||
if ( !BER_BVISNULL( &client->c_sasl_bind_mech ) ) {
|
||||
ber_memfree( client->c_sasl_bind_mech.bv_val );
|
||||
BER_BVZERO( &client->c_sasl_bind_mech );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue