]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9339 Fix syncrepl_monitor_init for dynamic monitor backend
authorHoward Chu <hyc@openldap.org>
Thu, 17 Sep 2020 14:22:01 +0000 (15:22 +0100)
committerHoward Chu <hyc@openldap.org>
Thu, 17 Sep 2020 14:22:01 +0000 (15:22 +0100)
Calling from backend.c only works if back-monitor is a static backend

servers/slapd/backend.c
servers/slapd/syncrepl.c

index f15ee9e8153208a3670c04f47590ed482a431aec..6215841c8267c4b532de0c442226f15b95bbb00e 100644 (file)
@@ -116,8 +116,10 @@ int backend_init(void)
 
                LDAP_STAILQ_INSERT_TAIL(&backendInfo, bi, bi_next);
        }
+#if defined(SLAPD_MONITOR) && SLAPD_MONITOR == SLAPD_MOD_STATIC
        /* HACK: need schema defined in deterministic order */
        syncrepl_monitor_init();
+#endif
 
 
        if ( nBackendInfo > 0) {
index 5c534f7bc305f06fff267fc57aa5d6dd4c389cd5..fbc9a0669327a21b28ec0870c27a633d2d5c9cd0 100644 (file)
@@ -7069,6 +7069,7 @@ add_syncrepl(
                si->si_cookieState->cs_ref++;
 
                si->si_next = NULL;
+               syncrepl_monitor_init();
 
                return 0;
        }