mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
ITS#8717 call connection delete callbacks
When TLS fails to start
This commit is contained in:
parent
2c36a37f90
commit
738723866e
@ -450,6 +450,31 @@ ldap_int_open_connection(
|
||||
--conn->lconn_refcnt;
|
||||
|
||||
if (rc != LDAP_SUCCESS) {
|
||||
/* process connection callbacks */
|
||||
{
|
||||
struct ldapoptions *lo;
|
||||
ldaplist *ll;
|
||||
ldap_conncb *cb;
|
||||
|
||||
lo = &ld->ld_options;
|
||||
LDAP_MUTEX_LOCK( &lo->ldo_mutex );
|
||||
if ( lo->ldo_conn_cbs ) {
|
||||
for ( ll=lo->ldo_conn_cbs; ll; ll=ll->ll_next ) {
|
||||
cb = ll->ll_data;
|
||||
cb->lc_del( ld, conn->lconn_sb, cb );
|
||||
}
|
||||
}
|
||||
LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
|
||||
lo = LDAP_INT_GLOBAL_OPT();
|
||||
LDAP_MUTEX_LOCK( &lo->ldo_mutex );
|
||||
if ( lo->ldo_conn_cbs ) {
|
||||
for ( ll=lo->ldo_conn_cbs; ll; ll=ll->ll_next ) {
|
||||
cb = ll->ll_data;
|
||||
cb->lc_del( ld, conn->lconn_sb, cb );
|
||||
}
|
||||
}
|
||||
LDAP_MUTEX_UNLOCK( &lo->ldo_mutex );
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user