]> git.sur5r.net Git - openldap/commitdiff
add "monitorIsShadow" (ITS#3696); more to come (see discussion)
authorPierangelo Masarati <ando@openldap.org>
Wed, 4 May 2005 09:27:22 +0000 (09:27 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 4 May 2005 09:27:22 +0000 (09:27 +0000)
servers/slapd/back-monitor/back-monitor.h
servers/slapd/back-monitor/database.c
servers/slapd/back-monitor/init.c

index 4f44291adc440fbabe44821659f23b6f3b5127ea..511c4c48abe57fb6a20fe48a5931a436c202e374 100644 (file)
@@ -120,6 +120,7 @@ typedef struct monitor_info_t {
        AttributeDescription    *mi_ad_monitorConnectionPeerDomain;
        AttributeDescription    *mi_ad_monitorConnectionStartTime;
        AttributeDescription    *mi_ad_monitorConnectionActivityTime;
+       AttributeDescription    *mi_ad_monitorIsShadow;
 
        /*
         * Generic description attribute
index f6f58134d4f43bd4cf0547b1d25dffc2badc7929..267042d8ee21a16cf2dda0fbb8951efa09ccc5fb 100644 (file)
@@ -196,17 +196,20 @@ monitor_subsys_database_init(
                                "structuralObjectClass: %s\n"
                                "cn: Database %d\n"
                                "%s: %s\n"
+                               "%s: %s\n"
                                "creatorsName: %s\n"
                                "modifiersName: %s\n"
                                "createTimestamp: %s\n"
                                "modifyTimestamp: %s\n",
                                i,
-                               ms->mss_dn.bv_val,
+                                       ms->mss_dn.bv_val,
                                mi->mi_oc_monitoredObject->soc_cname.bv_val,
                                mi->mi_oc_monitoredObject->soc_cname.bv_val,
                                i,
                                mi->mi_ad_monitoredInfo->ad_cname.bv_val,
-                               bi->bi_type,
+                                       bi->bi_type,
+                               mi->mi_ad_monitorIsShadow->ad_cname.bv_val,
+                                       SLAP_SHADOW( be ) ? slap_true_bv.bv_val : slap_false_bv.bv_val,
                                mi->mi_creatorsName.bv_val,
                                mi->mi_creatorsName.bv_val,
                                mi->mi_startTime.bv_val,
@@ -221,7 +224,7 @@ monitor_subsys_database_init(
                        return( -1 );
                }
                
-               if ( SLAP_MONITOR(be) ) {
+               if ( SLAP_MONITOR( be ) ) {
                        attr_merge( e, slap_schema.si_ad_monitorContext,
                                        be->be_suffix, be->be_nsuffix );
                        attr_merge( e_database, slap_schema.si_ad_monitorContext,
index 1e007a06babc23dfd54e5ffde1275c3f8e24f654..1986aae66759e3be02c5555f06463d341471ea61 100644 (file)
@@ -1158,6 +1158,14 @@ monitor_back_initialize(
                        "NO-USER-MODIFICATION "
                        "USAGE directoryOperation )", SLAP_AT_FINAL|SLAP_AT_HIDE,
                        offsetof(monitor_info_t, mi_ad_monitorConnectionActivityTime) },
+               { "monitorIsShadow", "( 1.3.6.1.4.1.4203.666.1.52 "
+                       "NAME 'monitorIsShadow' "
+                       "DESC 'TRUE if the database is shadow' "
+                       "EQUALITY booleanMatch "
+                       "SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 "
+                       "SINGLE-VALUE "
+                       "USAGE directoryOperation )", SLAP_AT_HIDE,
+                       offsetof(monitor_info_t, mi_ad_monitorIsShadow) },
                { NULL, NULL, 0, -1 }
        };