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.
This commit is contained in:
Howard Chu 2015-10-20 21:27:21 +01:00
parent c55d829aca
commit ad93b9e652

View file

@ -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