From: Howard Chu Date: Tue, 20 Oct 2015 20:27:21 +0000 (+0100) Subject: ITS#8277 simpler check for syncrepl on config DB X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ad93b9e652cdc0df7c168aade05e039d64c0fcad;p=openldap ITS#8277 simpler check for syncrepl on config DB Windows mutexes are recursive so the trylock test will succeed even though the mutex is already locked. Just compare be pointers. --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index dff0087e46..0efd445396 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -5687,7 +5687,7 @@ syncrepl_config( ConfigArgs *c ) * happen when running on the cn=config DB. */ if ( si->si_re ) { - if ( ldap_pvt_thread_mutex_trylock( &si->si_mutex )) { + if ( si->si_be == c->be || ldap_pvt_thread_mutex_trylock( &si->si_mutex )) { isrunning = 1; } else { /* There is no active thread, but we must still