int i;
struct monitorentrypriv *mp;
AttributeDescription *ad_nc = slap_schema.si_ad_namingContexts;
+ AttributeDescription *ad_mc = slap_schema.si_ad_monitorContext;
AttributeDescription *ad_seeAlso = NULL;
const char *text = NULL;
&monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn,
&e_database ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_database_init: "
"unable to get entry '%s'\n",
- monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val ));
+ monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_database_init: "
e = str2entry( buf );
if ( e == NULL ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_database_init: "
"unable to create entry 'cn=Database %d,%s'\n",
- i,
- monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val ));
+ i, monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_database_init: "
return( -1 );
}
- attr_merge( e, ad_nc, be->be_suffix );
- attr_merge( e_database, ad_nc, be->be_suffix );
+ if ( be->be_flags & SLAP_BFLAG_MONITOR ) {
+ attr_merge( e, ad_mc, be->be_suffix );
+ attr_merge( e_database, ad_mc, be->be_suffix );
+ } else {
+ attr_merge( e, ad_nc, be->be_suffix );
+ attr_merge( e_database, ad_nc, be->be_suffix );
+ }
for ( j = nBackendInfo; j--; ) {
if ( &backendInfo[ j ] == be->bd_info ) {
if ( monitor_cache_add( mi, e ) ) {
#ifdef NEW_LOGGING
- LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+ LDAP_LOG( OPERATION, CRIT,
"monitor_subsys_database_init: "
"unable to add entry 'cn=Database %d,%s'\n",
- i,
- monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val ));
+ i, monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY,
"monitor_subsys_database_init: "