]> git.sur5r.net Git - openldap/commitdiff
ITS#8277 simpler check for syncrepl on config DB
authorHoward Chu <hyc@openldap.org>
Tue, 20 Oct 2015 20:27:21 +0000 (21:27 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 26 Oct 2015 21:02:45 +0000 (16:02 -0500)
Windows mutexes are recursive so the trylock test will succeed
even though the mutex is already locked. Just compare be pointers.

servers/slapd/syncrepl.c

index 8323e130a67a8f9ce7d1dff956d875f1b5a63658..db9a39b12ada96ed92af3e254631acc2f220d4b3 100644 (file)
@@ -5626,7 +5626,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