]> 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)
committerHoward Chu <hyc@openldap.org>
Tue, 20 Oct 2015 20:30:00 +0000 (21:30 +0100)
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 dff0087e4660f73cd798c7bd898bb843e41b828d..0efd4453968ae743c035af1c4b14f21834dee03f 100644 (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