mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
ITS#8354 move abandon check
This commit is contained in:
parent
6d2eb36ccb
commit
a9df031d0d
@ -2552,11 +2552,6 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
||||
sop->s_inuse = 2;
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &si->si_ops_mutex );
|
||||
if ( op->o_abandon ) {
|
||||
ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex );
|
||||
ch_free( sop );
|
||||
return SLAPD_ABANDON;
|
||||
}
|
||||
while ( si->si_active ) {
|
||||
/* Wait for active mods to finish before proceeding, as they
|
||||
* may already have inspected the si_ops list looking for
|
||||
@ -2573,6 +2568,11 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
||||
ldap_pvt_thread_yield();
|
||||
ldap_pvt_thread_mutex_lock( &si->si_ops_mutex );
|
||||
}
|
||||
if ( op->o_abandon ) {
|
||||
ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex );
|
||||
ch_free( sop );
|
||||
return SLAPD_ABANDON;
|
||||
}
|
||||
ldap_pvt_thread_mutex_init( &sop->s_mutex );
|
||||
sop->s_next = si->si_ops;
|
||||
sop->s_si = si;
|
||||
|
Loading…
Reference in New Issue
Block a user