Commit 87ba3eb8 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

refine previous commits (don't leave bindings around)

parent c1c8c05c
......@@ -571,7 +571,9 @@ retry:;
mt, mc, candidate,
LDAP_BACK_CONN_ISPRIV( mc ),
LDAP_BACK_DONTSEND );
LDAP_BACK_CONN_BINDING_SET( msc );
if ( rc == LDAP_SUCCESS ) {
LDAP_BACK_CONN_BINDING_SET( msc );
}
} else {
/* can't do anything about it */
......
......@@ -1229,6 +1229,16 @@ finish:;
continue;
}
if ( mc ) {
ldap_pvt_thread_mutex_lock( &mi->mi_conninfo.lai_mutex );
if ( LDAP_BACK_CONN_BINDING( &mc->mc_conns[ i ] )
&& candidates[ i ].sr_msgid != META_MSGID_NEED_BIND )
{
LDAP_BACK_CONN_BINDING_CLEAR( &mc->mc_conns[ i ] );
}
ldap_pvt_thread_mutex_unlock( &mi->mi_conninfo.lai_mutex );
}
if ( candidates[ i ].sr_matched ) {
free( (char *)candidates[ i ].sr_matched );
candidates[ i ].sr_matched = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment