]> git.sur5r.net Git - openldap/commitdiff
use monitorContext for the monitor database
authorPierangelo Masarati <ando@openldap.org>
Wed, 19 Jun 2002 07:57:01 +0000 (07:57 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 19 Jun 2002 07:57:01 +0000 (07:57 +0000)
servers/slapd/back-monitor/database.c

index bfc1eded080642cadbc51ee4d9ab644608585e7a..66b0b0bce4520035df9c579c5888c08ca19aa27e 100644 (file)
@@ -48,6 +48,7 @@ monitor_subsys_database_init(
        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;
 
@@ -114,8 +115,13 @@ 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 ) {