mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-18 21:04:45 -05:00
runqueue locking fix (ITS#2746)
This commit is contained in:
parent
4f003dbdaf
commit
85ff0377d2
2 changed files with 3 additions and 1 deletions
|
|
@ -174,12 +174,14 @@ ldap_pvt_runqueue_persistent_backload(
|
|||
struct re_s* e;
|
||||
int count = 0;
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &rq->rq_mutex );
|
||||
if ( !LDAP_STAILQ_EMPTY( &rq->task_list )) {
|
||||
LDAP_STAILQ_FOREACH( e, &rq->task_list, tnext ) {
|
||||
if ( e->next_sched.tv_sec == 0 )
|
||||
count++;
|
||||
}
|
||||
}
|
||||
ldap_pvt_thread_mutex_unlock( &rq->rq_mutex );
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1358,9 +1358,9 @@ slapd_daemon_task(
|
|||
ldap_pvt_thread_pool_submit( &connection_pool,
|
||||
rtask->routine, (void *) rtask );
|
||||
}
|
||||
ldap_pvt_thread_mutex_lock( &syncrepl_rq.rq_mutex );
|
||||
rtask = ldap_pvt_runqueue_next_sched( &syncrepl_rq, &cat );
|
||||
}
|
||||
rtask = ldap_pvt_runqueue_next_sched( &syncrepl_rq, &cat );
|
||||
ldap_pvt_thread_mutex_unlock( &syncrepl_rq.rq_mutex );
|
||||
|
||||
if ( cat != NULL ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue