Moved the check for existing monitor database to the top, otherwise trying

to add multiple monitor databases through back-config deadlocks the server.
This commit is contained in:
Ralf Haferkamp 2007-04-04 17:14:09 +00:00
parent 848be16aaf
commit cb207b846a

View 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;