]> git.sur5r.net Git - openldap/commitdiff
Moved the check for existing monitor database to the top, otherwise trying
authorRalf Haferkamp <ralf@openldap.org>
Wed, 4 Apr 2007 17:14:09 +0000 (17:14 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Wed, 4 Apr 2007 17:14:09 +0000 (17:14 +0000)
to add multiple monitor databases through back-config deadlocks the server.

servers/slapd/back-monitor/init.c

index f2b798b1561f272ac54dcf7e8d9a0bb45b8c2602..594a42974a4d5249214f8d621ffd30942dcd22e6 100644 (file)
@@ -2062,15 +2062,6 @@ monitor_back_db_init(
 
        monitor_subsys_t        *ms;
 
-       /*
-        * register subsys
-        */
-       for ( ms = known_monitor_subsys; ms->mss_name != NULL; ms++ ) {
-               if ( monitor_back_register_subsys( ms ) ) {
-                       return -1;
-               }
-       }
-
        /*
         * database monitor can be defined once only
         */
@@ -2081,6 +2072,15 @@ monitor_back_db_init(
        }
        be_monitor = be;
 
+       /*
+        * register subsys
+        */
+       for ( ms = known_monitor_subsys; ms->mss_name != NULL; ms++ ) {
+               if ( monitor_back_register_subsys( ms ) ) {
+                       return -1;
+               }
+       }
+
        /* indicate system schema supported */
        SLAP_BFLAGS(be) |= SLAP_BFLAG_MONITOR;