mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Cleanup syncprov_db_close/CONFIG_DELETE code
No mutex needed since config ops are single-threaded. Don't send Unavailable message if we're shutting down.
This commit is contained in:
parent
278322ee5f
commit
7be5837dc0
@ -3168,16 +3168,16 @@ syncprov_db_close(
|
||||
}
|
||||
|
||||
#ifdef SLAP_CONFIG_DELETE
|
||||
ldap_pvt_thread_mutex_lock( &si->si_ops_mutex );
|
||||
for ( so=si->si_ops, sonext=so; so; so=sonext ) {
|
||||
SlapReply rs = {REP_RESULT};
|
||||
rs.sr_err = LDAP_UNAVAILABLE;
|
||||
send_ldap_result( so->s_op, &rs );
|
||||
sonext=so->s_next;
|
||||
syncprov_drop_psearch( so, 0);
|
||||
if ( !slapd_shutdown ) {
|
||||
for ( so=si->si_ops, sonext=so; so; so=sonext ) {
|
||||
SlapReply rs = {REP_RESULT};
|
||||
rs.sr_err = LDAP_UNAVAILABLE;
|
||||
send_ldap_result( so->s_op, &rs );
|
||||
sonext=so->s_next;
|
||||
syncprov_drop_psearch( so, 0);
|
||||
}
|
||||
si->si_ops=NULL;
|
||||
}
|
||||
si->si_ops=NULL;
|
||||
ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex );
|
||||
overlay_unregister_control( be, LDAP_CONTROL_SYNC );
|
||||
#endif /* SLAP_CONFIG_DELETE */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user