Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
f895a194
Commit
f895a194
authored
Mar 22, 2009
by
Howard Chu
Browse files
Fix 1.461, sync with HEAD
parent
d41b7b31
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/syncrepl.c
View file @
f895a194
...
...
@@ -4605,24 +4605,24 @@ syncrepl_config( ConfigArgs *c )
if
(
si
->
si_re
)
{
if
(
ldap_pvt_thread_mutex_trylock
(
&
si
->
si_mutex
))
{
isrunning
=
1
;
}
else
if
(
si
->
si_conn
)
{
isrunning
=
1
;
/* If there's a persistent connection, we don't
* know if it's already got a thread queued.
* so defer the free, but reschedule the task.
* If there's a connection thread queued, it
* will cleanup as necessary. If not, then the
* runqueue task will cleanup.
*/
ldap_pvt_thread_mutex_lock
(
&
slapd_rq
.
rq_mutex
);
if
(
!
ldap_pvt_runqueue_isrunning
(
&
slapd_rq
,
si
->
si_re
))
{
si
->
si_re
->
interval
.
tv_sec
=
0
;
ldap_pvt_runqueue_resched
(
&
slapd_rq
,
si
->
si_re
,
0
);
si
->
si_re
->
interval
.
tv_sec
=
si
->
si_interval
;
}
ldap_pvt_thread_mutex_unlock
(
&
slapd_rq
.
rq_mutex
);
}
else
{
if
(
si
->
si_conn
)
{
isrunning
=
1
;
/* If there's a persistent connection, we don't
* know if it's already got a thread queued.
* so defer the free, but reschedule the task.
* If there's a connection thread queued, it
* will cleanup as necessary. If not, then the
* runqueue task will cleanup.
*/
ldap_pvt_thread_mutex_lock
(
&
slapd_rq
.
rq_mutex
);
if
(
!
ldap_pvt_runqueue_isrunning
(
&
slapd_rq
,
si
->
si_re
))
{
si
->
si_re
->
interval
.
tv_sec
=
0
;
ldap_pvt_runqueue_resched
(
&
slapd_rq
,
si
->
si_re
,
0
);
si
->
si_re
->
interval
.
tv_sec
=
si
->
si_interval
;
}
ldap_pvt_thread_mutex_unlock
(
&
slapd_rq
.
rq_mutex
);
}
ldap_pvt_thread_mutex_unlock
(
&
si
->
si_mutex
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment