extern struct monitorsubsys monitor_subsys[];
extern AttributeDescription *monitor_ad_desc;
+extern BackendDB *be_monitor;
/*
* cache
* used by many functions to add description to entries
*/
AttributeDescription *monitor_ad_desc = NULL;
+BackendDB *be_monitor = NULL;
/*
* subsystem data
/*
* database monitor can be defined once only
*/
- static int monitor_defined = 0;
-
- if ( monitor_defined ) {
+ if ( be_monitor ) {
#ifdef NEW_LOGGING
LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
"only one monitor backend is allowed\n" ));
#endif
return( -1 );
}
- monitor_defined++;
+ be_monitor = be;
ndn = NULL;
dn.bv_val = SLAPD_MONITOR_DN;
#endif
/* check that the entry still obeys the schema */
- rc = entry_schema_check( NULL, e, save_attrs, &text, textbuf,
- sizeof( textbuf ) );
+ rc = entry_schema_check( be_monitor, e, save_attrs,
+ &text, textbuf, sizeof( textbuf ) );
if ( rc != LDAP_SUCCESS ) {
goto cleanup;
}