]> git.sur5r.net Git - openldap/commitdiff
use back-monitor without including core.schema; commit by now; will cleanup later
authorPierangelo Masarati <ando@openldap.org>
Sat, 17 May 2003 17:19:16 +0000 (17:19 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 17 May 2003 17:19:16 +0000 (17:19 +0000)
12 files changed:
servers/slapd/back-monitor/back-monitor.h
servers/slapd/back-monitor/backend.c
servers/slapd/back-monitor/conn.c
servers/slapd/back-monitor/database.c
servers/slapd/back-monitor/init.c
servers/slapd/back-monitor/listener.c
servers/slapd/back-monitor/log.c
servers/slapd/back-monitor/operation.c
servers/slapd/back-monitor/rww.c
servers/slapd/back-monitor/sent.c
servers/slapd/back-monitor/thread.c
servers/slapd/back-monitor/time.c

index 0ab1bbabd5ab5f9f76bd748bd393e056a1f56aae..5d0dc32be4a628947beb6e60dce555f2f2418028 100644 (file)
@@ -87,31 +87,32 @@ struct monitorinfo {
        /*
         * Specific schema entities
         */
-       ObjectClass *oc_monitor;
-       ObjectClass *oc_monitorServer;
-       ObjectClass *oc_monitorContainer;
-       ObjectClass *oc_monitorCounterObject;
-       ObjectClass *oc_monitorOperation;
-       ObjectClass *oc_monitorConnection;
-       ObjectClass *oc_managedObject;
-       ObjectClass *oc_monitoredObject;
-
-       AttributeDescription *ad_monitoredInfo;
-       AttributeDescription *ad_managedInfo;
-       AttributeDescription *ad_monitorCounter;
-       AttributeDescription *ad_monitorOpCompleted;
-       AttributeDescription *ad_monitorOpInitiated;
-       AttributeDescription *ad_monitorConnectionNumber;
-       AttributeDescription *ad_monitorConnectionAuthzDN;
-       AttributeDescription *ad_monitorConnectionLocalAddress;
-       AttributeDescription *ad_monitorConnectionPeerAddress;
-       AttributeDescription *ad_monitorTimestamp;
+       ObjectClass *mi_oc_monitor;
+       ObjectClass *mi_oc_monitorServer;
+       ObjectClass *mi_oc_monitorContainer;
+       ObjectClass *mi_oc_monitorCounterObject;
+       ObjectClass *mi_oc_monitorOperation;
+       ObjectClass *mi_oc_monitorConnection;
+       ObjectClass *mi_oc_managedObject;
+       ObjectClass *mi_oc_monitoredObject;
+
+       AttributeDescription *mi_ad_monitoredInfo;
+       AttributeDescription *mi_ad_managedInfo;
+       AttributeDescription *mi_ad_monitorCounter;
+       AttributeDescription *mi_ad_monitorOpCompleted;
+       AttributeDescription *mi_ad_monitorOpInitiated;
+       AttributeDescription *mi_ad_monitorConnectionNumber;
+       AttributeDescription *mi_ad_monitorConnectionAuthzDN;
+       AttributeDescription *mi_ad_monitorConnectionLocalAddress;
+       AttributeDescription *mi_ad_monitorConnectionPeerAddress;
+       AttributeDescription *mi_ad_monitorTimestamp;
 
        /*
         * Generic description attribute
         */
-       AttributeDescription *ad_description;
-       AttributeDescription *ad_seeAlso;
+       AttributeDescription *mi_ad_description;
+       AttributeDescription *mi_ad_seeAlso;
+       AttributeDescription *mi_ad_l;
 };
 
 /*
index 67eef9c256694fe688347e030fc9006c127697cf..f915a099c433bc553e9eb3548b1671d012a0682a 100644 (file)
@@ -91,8 +91,8 @@ monitor_subsys_backend_init(
                                "modifyTimestamp: %s\n",
                                i,
                                monitor_subsys[SLAPD_MONITOR_BACKEND].mss_dn.bv_val,
-                               mi->oc_monitoredObject->soc_cname.bv_val,
-                               mi->oc_monitoredObject->soc_cname.bv_val,
+                               mi->mi_oc_monitoredObject->soc_cname.bv_val,
+                               mi->mi_oc_monitoredObject->soc_cname.bv_val,
                                i,
                                mi->mi_startTime.bv_val,
                                mi->mi_startTime.bv_val );
@@ -118,9 +118,9 @@ monitor_subsys_backend_init(
                bv.bv_val = bi->bi_type;
                bv.bv_len = strlen( bv.bv_val );
 
-               attr_merge_normalize_one( e, mi->ad_monitoredInfo,
+               attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo,
                                &bv, NULL );
-               attr_merge_normalize_one( e_backend, mi->ad_monitoredInfo,
+               attr_merge_normalize_one( e_backend, mi->mi_ad_monitoredInfo,
                                &bv, NULL );
 
                if ( bi->bi_controls ) {
@@ -147,7 +147,7 @@ monitor_subsys_backend_init(
                        dn.bv_val = buf;
                        dn.bv_len = strlen( buf );
 
-                       attr_merge_normalize_one( e, mi->ad_seeAlso,
+                       attr_merge_normalize_one( e, mi->mi_ad_seeAlso,
                                        &dn, NULL );
                }
                
index d2fe8d447107252c2cb5f11d63cdfdb7b5b21f87..075b6abba09bfe0d46d2d58607bca5cc4177f4a9 100644 (file)
@@ -88,8 +88,8 @@ monitor_subsys_conn_init(
                "createTimestamp: %s\n"
                "modifyTimestamp: %s\n",
                monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val,
-               mi->oc_monitorCounterObject->soc_cname.bv_val,
-               mi->oc_monitorCounterObject->soc_cname.bv_val,
+               mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+               mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
                mi->mi_startTime.bv_val,
                mi->mi_startTime.bv_val );
        
@@ -112,7 +112,7 @@ monitor_subsys_conn_init(
        
        bv.bv_val = "0";
        bv.bv_len = 1;
-       attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+       attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
        
        mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
        e->e_private = ( void * )mp;
@@ -152,8 +152,8 @@ monitor_subsys_conn_init(
                "createTimestamp: %s\n"
                "modifyTimestamp: %s\n",
                monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val,
-               mi->oc_monitorCounterObject->soc_cname.bv_val,
-               mi->oc_monitorCounterObject->soc_cname.bv_val,
+               mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+               mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
                mi->mi_startTime.bv_val,
                mi->mi_startTime.bv_val );
        
@@ -176,7 +176,7 @@ monitor_subsys_conn_init(
        
        bv.bv_val = "0";
        bv.bv_len = 1;
-       attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+       attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
        
        mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
        e->e_private = ( void * )mp;
@@ -246,7 +246,7 @@ monitor_subsys_conn_update(
                Attribute       *a;
                char            buf[] = "+9223372036854775807L";
 
-               a = attr_find( e->e_attrs, mi->ad_monitorCounter );
+               a = attr_find( e->e_attrs, mi->mi_ad_monitorCounter );
                if ( a == NULL ) {
                        return( -1 );
                }
@@ -306,8 +306,8 @@ conn_create(
                "createTimestamp: %s\n"
                "modifyTimestamp: %s\n",
                c->c_connid, monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val,
-               mi->oc_monitorConnection->soc_cname.bv_val,
-               mi->oc_monitorConnection->soc_cname.bv_val,
+               mi->mi_oc_monitorConnection->soc_cname.bv_val,
+               mi->mi_oc_monitorConnection->soc_cname.bv_val,
                c->c_connid,
                ctmbuf, mtmbuf );
                
@@ -377,24 +377,24 @@ conn_create(
 
        bv.bv_val = buf;
        bv.bv_len = strlen( buf );
-       attr_merge_one( e, mi->ad_monitoredInfo, &bv, NULL );
+       attr_merge_one( e, mi->mi_ad_monitoredInfo, &bv, NULL );
 
        /* connection number */
        snprintf( buf, sizeof( buf ), "%ld", c->c_connid );
        bv.bv_val = buf;
        bv.bv_len = strlen( buf );
-       attr_merge_one( e, mi->ad_monitorConnectionNumber, &bv, NULL );
+       attr_merge_one( e, mi->mi_ad_monitorConnectionNumber, &bv, NULL );
 
        /* authz DN */
-       attr_merge_one( e, mi->ad_monitorConnectionAuthzDN,
+       attr_merge_one( e, mi->mi_ad_monitorConnectionAuthzDN,
                        &c->c_dn, &c->c_ndn );
 
        /* local address */
-       attr_merge_one( e, mi->ad_monitorConnectionLocalAddress,
+       attr_merge_one( e, mi->mi_ad_monitorConnectionLocalAddress,
                        &c->c_sock_name, NULL );
 
        /* peer address */
-       attr_merge_one( e, mi->ad_monitorConnectionPeerAddress,
+       attr_merge_one( e, mi->mi_ad_monitorConnectionPeerAddress,
                        &c->c_peer_name, NULL );
 
        mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
index 6ee2db645795f04007276c8e36812d22cf277e10..0874552e30a9f9a756b2d4390d9b10122239881b 100644 (file)
@@ -99,10 +99,10 @@ monitor_subsys_database_init(
                                "modifyTimestamp: %s\n",
                                i,
                                monitor_subsys[SLAPD_MONITOR_DATABASE].mss_dn.bv_val,
-                               mi->oc_monitoredObject->soc_cname.bv_val,
-                               mi->oc_monitoredObject->soc_cname.bv_val,
+                               mi->mi_oc_monitoredObject->soc_cname.bv_val,
+                               mi->mi_oc_monitoredObject->soc_cname.bv_val,
                                i,
-                               mi->ad_monitoredInfo->ad_cname.bv_val,
+                               mi->mi_ad_monitoredInfo->ad_cname.bv_val,
                                be->bd_info->bi_type,
                                mi->mi_startTime.bv_val,
                                mi->mi_startTime.bv_val );
@@ -146,7 +146,7 @@ monitor_subsys_database_init(
                                        j, monitor_subsys[SLAPD_MONITOR_BACKEND].mss_dn.bv_val );
                                bv.bv_val = buf;
                                bv.bv_len = strlen( buf );
-                               attr_merge_normalize_one( e, mi->ad_seeAlso,
+                               attr_merge_normalize_one( e, mi->mi_ad_seeAlso,
                                                &bv, NULL );
                                break;
                        }
@@ -236,7 +236,7 @@ monitor_back_add_plugin( Backend *be, Entry *e_database )
                bv.bv_val = buf;
                bv.bv_len = strlen( buf );
                attr_merge_normalize_one( e_database,
-                               mi->ad_monitoredInfo, &bv, NULL );
+                               mi->mi_ad_monitoredInfo, &bv, NULL );
 
                i++;
 
index e6c41ba8211094895eea4c2f0d12a8b89e2609b7..4173c99536f69f23e62bac491e64f252ad36a878 100644 (file)
@@ -41,6 +41,8 @@
 #include "lber_pvt.h"
 #include "back-monitor.h"
 
+#define INTEGRATE_CORE_SCHEMA
+
 /*
  * used by many functions to add description to entries
  */
@@ -303,7 +305,7 @@ monitor_back_db_open(
        struct monitorsubsys    *ms;
        Entry                   *e, *e_tmp;
        struct monitorentrypriv *mp;
-       int                     i;
+       int                     i, k;
        char                    buf[ BACKMONITOR_BUFSIZE ], *end_of_line;
        const char              *text;
        struct berval           bv;
@@ -320,50 +322,52 @@ monitor_back_db_open(
                        "MAY ( "
                                "description "
                                "$ l "
+#if 0  /* temporarily disabled */
                                "$ st "
                                "$ street "
                                "$ postalAddress "
                                "$ postalCode "
+#endif
                                "$ seeAlso "
                                "$ monitoredInfo "
                                "$ managedInfo "
                        ") )",
-                       offsetof(struct monitorinfo, oc_monitor) },
+                       offsetof(struct monitorinfo, mi_oc_monitor) },
                { "monitorServer", "( 1.3.6.1.4.1.4203.666.3.7 "
                        "NAME 'monitorServer' "
                        "DESC 'Server monitoring root entry' "
                        "SUP monitor STRUCTURAL )",
-                       offsetof(struct monitorinfo, oc_monitorServer) },
+                       offsetof(struct monitorinfo, mi_oc_monitorServer) },
                { "monitorContainer", "( 1.3.6.1.4.1.4203.666.3.8 "
                        "NAME 'monitorContainer' "
                        "DESC 'monitor container class' "
                        "SUP monitor STRUCTURAL )",
-                       offsetof(struct monitorinfo, oc_monitorContainer) },
+                       offsetof(struct monitorinfo, mi_oc_monitorContainer) },
                { "monitorCounterObject", "( 1.3.6.1.4.1.4203.666.3.9 "
                        "NAME 'monitorCounterObject' "
                        "DESC 'monitor counter class' "
                        "SUP monitor STRUCTURAL )",
-                       offsetof(struct monitorinfo, oc_monitorCounterObject) },
+                       offsetof(struct monitorinfo, mi_oc_monitorCounterObject) },
                { "monitorOperation", "( 1.3.6.1.4.1.4203.666.3.10 "
                        "NAME 'monitorOperation' "
                        "DESC 'monitor operation class' "
                        "SUP monitor STRUCTURAL )",
-                       offsetof(struct monitorinfo, oc_monitorOperation) },
+                       offsetof(struct monitorinfo, mi_oc_monitorOperation) },
                { "monitorConnection", "( 1.3.6.1.4.1.4203.666.3.11 "
                        "NAME 'monitorConnection' "
                        "DESC 'monitor connection class' "
                        "SUP monitor STRUCTURAL )",
-                       offsetof(struct monitorinfo, oc_monitorConnection) },
+                       offsetof(struct monitorinfo, mi_oc_monitorConnection) },
                { "managedObject", "( 1.3.6.1.4.1.4203.666.3.12 "
                        "NAME 'managedObject' "
                        "DESC 'monitor managed entity class' "
                        "SUP monitor STRUCTURAL )",
-                       offsetof(struct monitorinfo, oc_managedObject) },
+                       offsetof(struct monitorinfo, mi_oc_managedObject) },
                { "monitoredObject", "( 1.3.6.1.4.1.4203.666.3.13 "
                        "NAME 'monitoredObject' "
                        "DESC 'monitor monitored entity class' "
                        "SUP monitor STRUCTURAL )",
-                       offsetof(struct monitorinfo, oc_monitoredObject) },
+                       offsetof(struct monitorinfo, mi_oc_monitoredObject) },
                { NULL, NULL, -1 }
        }, mat[] = {
                { "monitoredInfo", "( 1.3.6.1.4.1.4203.666.1.14 "
@@ -375,12 +379,12 @@ monitor_back_db_open(
                        "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768} "
                        "NO-USER-MODIFICATION "
                        "USAGE directoryOperation )",
-                       offsetof(struct monitorinfo, ad_monitoredInfo) },
+                       offsetof(struct monitorinfo, mi_ad_monitoredInfo) },
                { "managedInfo", "( 1.3.6.1.4.1.4203.666.1.15 "
                        "NAME 'managedInfo' "
                        "DESC 'monitor managed info' "
                        "SUP name )",
-                       offsetof(struct monitorinfo, ad_managedInfo) },
+                       offsetof(struct monitorinfo, mi_ad_managedInfo) },
                { "monitorCounter", "( 1.3.6.1.4.1.4203.666.1.16 "
                        "NAME 'monitorCounter' "
                        "DESC 'monitor counter' "
@@ -389,28 +393,28 @@ monitor_back_db_open(
                        "SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 "
                        "NO-USER-MODIFICATION "
                        "USAGE directoryOperation )",
-                       offsetof(struct monitorinfo, ad_monitorCounter) },
+                       offsetof(struct monitorinfo, mi_ad_monitorCounter) },
                { "monitorOpCompleted", "( 1.3.6.1.4.1.4203.666.1.17 "
                        "NAME 'monitorOpCompleted' "
                        "DESC 'monitor completed operations' "
                        "SUP monitorCounter "
                        "NO-USER-MODIFICATION "
                        "USAGE directoryOperation )",
-                       offsetof(struct monitorinfo, ad_monitorOpCompleted) },
+                       offsetof(struct monitorinfo, mi_ad_monitorOpCompleted) },
                { "monitorOpInitiated", "( 1.3.6.1.4.1.4203.666.1.18 "
                        "NAME 'monitorOpInitiated' "
                        "DESC 'monitor initiated operations' "
                        "SUP monitorCounter "
                        "NO-USER-MODIFICATION "
                        "USAGE directoryOperation )",
-                       offsetof(struct monitorinfo, ad_monitorOpInitiated) },
+                       offsetof(struct monitorinfo, mi_ad_monitorOpInitiated) },
                { "monitorConnectionNumber", "( 1.3.6.1.4.1.4203.666.1.19 "
                        "NAME 'monitorConnectionNumber' "
                        "DESC 'monitor connection number' "
                        "SUP monitorCounter "
                        "NO-USER-MODIFICATION "
                        "USAGE directoryOperation )",
-                       offsetof(struct monitorinfo, ad_monitorConnectionNumber) },
+                       offsetof(struct monitorinfo, mi_ad_monitorConnectionNumber) },
                { "monitorConnectionAuthzDN", "( 1.3.6.1.4.1.4203.666.1.20 "
                        "NAME 'monitorConnectionAuthzDN' "
                        "DESC 'monitor connection authorization DN' "
@@ -419,32 +423,60 @@ monitor_back_db_open(
                        "SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 "
                        "NO-USER-MODIFICATION "
                        "USAGE directoryOperation )",
-                       offsetof(struct monitorinfo, ad_monitorConnectionAuthzDN) },
+                       offsetof(struct monitorinfo, mi_ad_monitorConnectionAuthzDN) },
                { "monitorConnectionLocalAddress", "( 1.3.6.1.4.1.4203.666.1.21 "
                        "NAME 'monitorConnectionLocalAddress' "
                        "DESC 'monitor connection local address' "
                        "SUP monitoredInfo "
                        "NO-USER-MODIFICATION "
                        "USAGE directoryOperation )",
-                       offsetof(struct monitorinfo, ad_monitorConnectionLocalAddress) },
+                       offsetof(struct monitorinfo, mi_ad_monitorConnectionLocalAddress) },
                { "monitorConnectionPeerAddress", "( 1.3.6.1.4.1.4203.666.1.22 "
                        "NAME 'monitorConnectionPeerAddress' "
                        "DESC 'monitor connection peer address' "
                        "SUP monitoredInfo "
                        "NO-USER-MODIFICATION "
                        "USAGE directoryOperation )",
-                       offsetof(struct monitorinfo, ad_monitorConnectionPeerAddress) },
+                       offsetof(struct monitorinfo, mi_ad_monitorConnectionPeerAddress) },
                { "monitorTimestamp", "( 1.3.6.1.4.1.4203.666.1.24 "
                        "NAME 'monitorTimestamp' "
                        "DESC 'monitor timestamp' "
                        "EQUALITY generalizedTimeMatch "
                        "ORDERING generalizedTimeOrderingMatch "
                        "SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 "
-                       "SINGLE-VALUE )",
-                       offsetof(struct monitorinfo, ad_monitorTimestamp) },
+                       "SINGLE-VALUE"
+                       "NO-USER-MODIFICATION "
+                       "USAGE directoryOperation )",
+                       offsetof(struct monitorinfo, mi_ad_monitorTimestamp) },
+#ifdef INTEGRATE_CORE_SCHEMA
+               { NULL, NULL, -1 },     /* description */
+               { NULL, NULL, -1 },     /* seeAlso */
+               { NULL, NULL, -1 },     /* l */
+#endif /* INTEGRATE_CORE_SCHEMA */
+               { NULL, NULL, -1 }
+#ifdef INTEGRATE_CORE_SCHEMA
+       }, mat_core[] = {
+               { "description", "( 2.5.4.13 "
+                       "NAME 'description' "
+                       "DESC 'RFC2256: descriptive information' "
+                       "EQUALITY caseIgnoreMatch "
+                       "SUBSTR caseIgnoreSubstringsMatch "
+                       "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024} )",
+                       offsetof(struct monitorinfo, mi_ad_description) },
+               { "seeAlso", "( 2.5.4.34 "
+                       "NAME 'seeAlso' "
+                       "DESC 'RFC2256: DN of related object' "
+                       "SUP distinguishedName )",
+                       offsetof(struct monitorinfo, mi_ad_seeAlso) },
+               { "l", "( 2.5.4.7 "
+                       "NAME ( 'l' 'localityName' ) "
+                       "DESC 'RFC2256: locality which this object resides in' "
+                       "SUP name )",
+                       offsetof(struct monitorinfo, mi_ad_l) },
                { NULL, NULL, -1 }
+#endif /* INTEGRATE_CORE_SCHEMA */
        };
-
+       
        struct tm               *tms;
        static char             tmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
 
@@ -464,6 +496,42 @@ monitor_back_db_open(
        mi->mi_startTime.bv_val = tmbuf;
        mi->mi_startTime.bv_len = strlen( tmbuf );
 
+       /* prepare for schema integration */
+       for ( k = 0; mat[k].name != NULL; k++ );
+
+       for ( i = 0; mat_core[i].name != NULL; i++ ) {
+               AttributeDescription    **ad;
+               const char              *text;
+
+               ad = ((AttributeDescription **)&(((char *)mi)[mat_core[i].offset]));
+               ad[0] = NULL;
+
+               switch (slap_str2ad( mat_core[i].name, ad, &text ) ) {
+               case LDAP_SUCCESS:
+                       break;
+
+#ifdef INTEGRATE_CORE_SCHEMA
+               case LDAP_UNDEFINED_TYPE:
+                       mat[k] = mat_core[i];
+                       k++;
+                       break;
+#endif /* INTEGRATE_CORE_SCHEMA */
+
+               default:
+#ifdef NEW_LOGGING
+                       LDAP_LOG( OPERATION, CRIT,
+                               "monitor_back_db_init: %s: %s\n",
+                               mat_core[i].name, text, 0 );
+#else
+                       Debug( LDAP_DEBUG_ANY,
+                               "monitor_back_db_init: %s: %s\n",
+                               mat_core[i].name, text, 0 );
+#endif
+                       return( -1 );
+               }
+       }
+
+       /* schema integration */
        for ( i = 0; mat[i].name; i++ ) {
                LDAPAttributeType       *at;
                int                     code;
@@ -527,28 +595,6 @@ monitor_back_db_open(
                }
        }
 
-       if ( slap_str2ad( "description", &mi->ad_description, &text ) ) {
-#ifdef NEW_LOGGING
-               LDAP_LOG( OPERATION, CRIT,
-                       "monitor_back_db_init: description: %s\n", text, 0, 0 );
-#else
-               Debug( LDAP_DEBUG_ANY,
-                       "monitor_back_db_init: description: %s\n", text, 0, 0 );
-#endif
-               return( -1 );
-       }
-
-       if ( slap_str2ad( "seeAlso", &mi->ad_seeAlso, &text ) ) {
-#ifdef NEW_LOGGING
-               LDAP_LOG( OPERATION, CRIT,
-                       "monitor_back_db_init: seeAlso: %s\n", text, 0, 0 );
-#else
-               Debug( LDAP_DEBUG_ANY,
-                       "monitor_back_db_init: seeAlso: %s\n", text, 0, 0 );
-#endif
-               return( -1 );
-       }
-
        for ( i = 0; moc[i].name; i++ ) {
                LDAPObjectClass         *oc;
                int                     code;
@@ -674,8 +720,8 @@ monitor_back_db_open(
                                "createTimestamp: %s\n"
                                "modifyTimestamp: %s\n",
                                monitor_subsys[ i ].mss_dn.bv_val,
-                               mi->oc_monitorContainer->soc_cname.bv_val,
-                               mi->oc_monitorContainer->soc_cname.bv_val,
+                               mi->mi_oc_monitorContainer->soc_cname.bv_val,
+                               mi->mi_oc_monitorContainer->soc_cname.bv_val,
                                monitor_subsys[ i ].mss_name,
                                mi->mi_startTime.bv_val,
                                mi->mi_startTime.bv_val );
@@ -728,16 +774,20 @@ monitor_back_db_open(
                "cn: Monitor\n"
                "%s: This subtree contains monitoring/managing objects.\n"
                "%s: This object contains information about this server.\n"
+#if 0
                "%s: createTimestamp reflects the time this server instance was created.\n"
-               "%s: modifyTimestamp reflects the current time.\n"
+               "%s: modifyTimestamp reflects the time this server instance was last accessed.\n"
+#endif
                "createTimestamp: %s\n"
                "modifyTimestamp: %s\n",
-               mi->oc_monitorServer->soc_cname.bv_val,
-               mi->oc_monitorServer->soc_cname.bv_val,
-               mi->ad_description->ad_cname.bv_val,
-               mi->ad_description->ad_cname.bv_val,
-               mi->ad_description->ad_cname.bv_val,
-               mi->ad_description->ad_cname.bv_val,
+               mi->mi_oc_monitorServer->soc_cname.bv_val,
+               mi->mi_oc_monitorServer->soc_cname.bv_val,
+               mi->mi_ad_description->ad_cname.bv_val,
+               mi->mi_ad_description->ad_cname.bv_val,
+#if 0
+               mi->mi_ad_description->ad_cname.bv_val,
+               mi->mi_ad_description->ad_cname.bv_val,
+#endif
                mi->mi_startTime.bv_val,
                mi->mi_startTime.bv_val );
 
@@ -763,7 +813,7 @@ monitor_back_db_open(
                bv.bv_len = strlen( Versionstr );
        }
 
-       if ( attr_merge_normalize_one( e, mi->ad_monitoredInfo,
+       if ( attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo,
                                &bv, NULL ) ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, CRIT,
@@ -778,21 +828,7 @@ monitor_back_db_open(
        }
 
        if ( mi->mi_l.bv_len ) {
-               AttributeDescription    *ad = NULL;
-               const char              *text = NULL;
-
-               if ( slap_str2ad( "l", &ad, &text ) ) {
-#ifdef NEW_LOGGING
-                       LDAP_LOG( OPERATION, CRIT, "unable to get 'l'\n",
-                               SLAPD_MONITOR_DN, 0, 0 );
-#else
-                       Debug( LDAP_DEBUG_ANY, "unable to get 'l'\n",
-                               SLAPD_MONITOR_DN, 0, 0 );
-#endif
-                       return( -1 );
-               }
-               
-               if ( attr_merge_normalize_one( e, ad, &mi->mi_l, NULL ) ) {
+               if ( attr_merge_normalize_one( e, mi->mi_ad_l, &mi->mi_l, NULL ) ) {
 #ifdef NEW_LOGGING
                        LDAP_LOG( OPERATION, CRIT,
                                "unable to add locality to '%s' entry\n",
index bcb540c4160f07137cbc60aa6afab4b91c32359c..14179b0263dc85aed231ebd1d9a81ae8cc32f016 100644 (file)
@@ -100,10 +100,10 @@ monitor_subsys_listener_init(
                                "modifyTimestamp: %s\n",
                                i,
                                monitor_subsys[SLAPD_MONITOR_LISTENER].mss_dn.bv_val,
-                               mi->oc_monitoredObject->soc_cname.bv_val,
-                               mi->oc_monitoredObject->soc_cname.bv_val,
+                               mi->mi_oc_monitoredObject->soc_cname.bv_val,
+                               mi->mi_oc_monitoredObject->soc_cname.bv_val,
                                i,
-                               mi->ad_monitorConnectionLocalAddress->ad_cname.bv_val,
+                               mi->mi_ad_monitorConnectionLocalAddress->ad_cname.bv_val,
                                l[i]->sl_name.bv_val,
                                l[i]->sl_url.bv_val,
                                mi->mi_startTime.bv_val,
@@ -134,7 +134,7 @@ monitor_subsys_listener_init(
                        bv.bv_val = "TLS";
                        bv.bv_len = sizeof("TLS")-1;
 
-                       attr_merge_normalize_one( e, mi->ad_monitoredInfo,
+                       attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo,
                                        &bv, NULL );
                }
 #endif /* HAVE_TLS */
@@ -145,7 +145,7 @@ monitor_subsys_listener_init(
                        bv.bv_val = "UDP";
                        bv.bv_len = sizeof("UDP")-1;
 
-                       attr_merge_normalize_one( e, mi->ad_monitoredInfo,
+                       attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo,
                                        &bv, NULL );
                }
 #endif /* HAVE_TLS */
index 2cce628347dbd8c5fdbaa374bae670ea6b9ae9f4..6b072071b27ceb62f34dd9c0d6263ef8f5cc6a36 100644 (file)
@@ -118,13 +118,13 @@ monitor_subsys_log_init(
        /* initialize the debug level(s) */
        for ( i = 0; int_2_level[ i ].i != 0; i++ ) {
 
-               if ( mi->ad_managedInfo->ad_type->sat_equality->smr_normalize ) {
+               if ( mi->mi_ad_managedInfo->ad_type->sat_equality->smr_normalize ) {
                        int     rc;
 
-                       rc = (*mi->ad_managedInfo->ad_type->sat_equality->smr_normalize)(
+                       rc = (*mi->mi_ad_managedInfo->ad_type->sat_equality->smr_normalize)(
                                        0,
-                                       mi->ad_managedInfo->ad_type->sat_syntax,
-                                       mi->ad_managedInfo->ad_type->sat_equality,
+                                       mi->mi_ad_managedInfo->ad_type->sat_syntax,
+                                       mi->mi_ad_managedInfo->ad_type->sat_equality,
                                        &int_2_level[ i ].s,
                                        &int_2_level[ i ].n, NULL );
                        if ( rc ) {
@@ -133,13 +133,13 @@ monitor_subsys_log_init(
                }
 
                if ( int_2_level[ i ].i & ldap_syslog ) {
-                       attr_merge_one( e, mi->ad_managedInfo,
+                       attr_merge_one( e, mi->mi_ad_managedInfo,
                                        &int_2_level[ i ].s,
                                        &int_2_level[ i ].n );
                }
        }
 
-       attr_merge( e, mi->ad_description, desc, NULL );
+       attr_merge( e, mi->mi_ad_description, desc, NULL );
 
        monitor_cache_release( mi, e );
 
@@ -183,7 +183,7 @@ monitor_subsys_log_modify(
                /*
                 * only the monitor description attribute can be modified
                 */
-               } else if ( mod->sm_desc != mi->ad_managedInfo) {
+               } else if ( mod->sm_desc != mi->mi_ad_managedInfo) {
                        rc = LDAP_UNWILLING_TO_PERFORM;
                        break;
                }
index 1e4fb34ba7ebaf694f955e0e657bace0357d2ab0..6703cf3423f5e0a50631dc586e08191938a7a4d6 100644 (file)
@@ -106,11 +106,11 @@ monitor_subsys_ops_init(
                                "modifyTimestamp: %s\n",
                                bv_op[ i ].bv_val,
                                monitor_subsys[SLAPD_MONITOR_OPS].mss_dn.bv_val,
-                               mi->oc_monitorOperation->soc_cname.bv_val,
-                               mi->oc_monitorOperation->soc_cname.bv_val,
+                               mi->mi_oc_monitorOperation->soc_cname.bv_val,
+                               mi->mi_oc_monitorOperation->soc_cname.bv_val,
                                bv_op[ i ].bv_val,
-                               mi->ad_monitorOpInitiated->ad_cname.bv_val,
-                               mi->ad_monitorOpCompleted->ad_cname.bv_val,
+                               mi->mi_ad_monitorOpInitiated->ad_cname.bv_val,
+                               mi->mi_ad_monitorOpCompleted->ad_cname.bv_val,
                                mi->mi_startTime.bv_val,
                                mi->mi_startTime.bv_val );
 
@@ -199,13 +199,13 @@ monitor_subsys_ops_update(
                return( 0 );
        }
 
-       a = attr_find( e->e_attrs, mi->ad_monitorOpInitiated );
+       a = attr_find( e->e_attrs, mi->mi_ad_monitorOpInitiated );
        assert ( a != NULL );
        snprintf( buf, sizeof( buf ), "%ld", nInitiated );
        free( a->a_vals[ 0 ].bv_val );
        ber_str2bv( buf, 0, 1, &a->a_vals[ 0 ] );
 
-       a = attr_find( e->e_attrs, mi->ad_monitorOpCompleted );
+       a = attr_find( e->e_attrs, mi->mi_ad_monitorOpCompleted );
        assert ( a != NULL );
        snprintf( buf, sizeof( buf ), "%ld", nCompleted );
        free( a->a_vals[ 0 ].bv_val );
index 82992b960b6af04f46fdc468dcb57ca43ea95fd3..9839a16064386daa888435ce09b776c3421dc9bd 100644 (file)
@@ -86,8 +86,8 @@ monitor_subsys_rww_init(
                "createTimestamp: %s\n"
                "modifyTimestamp: %s\n",
                monitor_subsys[SLAPD_MONITOR_RWW].mss_dn.bv_val,
-               mi->oc_monitorCounterObject->soc_cname.bv_val,
-               mi->oc_monitorCounterObject->soc_cname.bv_val,
+               mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+               mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
                mi->mi_startTime.bv_val,
                mi->mi_startTime.bv_val );
        
@@ -109,7 +109,7 @@ monitor_subsys_rww_init(
        
        bv.bv_val = "0";
        bv.bv_len = 1;
-       attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+       attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
        
        mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
        e->e_private = ( void * )mp;
@@ -147,8 +147,8 @@ monitor_subsys_rww_init(
                "createTimestamp: %s\n"
                "modifyTimestamp: %s\n",
                monitor_subsys[SLAPD_MONITOR_RWW].mss_dn.bv_val,
-               mi->oc_monitorCounterObject->soc_cname.bv_val,
-               mi->oc_monitorCounterObject->soc_cname.bv_val,
+               mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+               mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
                mi->mi_startTime.bv_val,
                mi->mi_startTime.bv_val );
        
@@ -170,7 +170,7 @@ monitor_subsys_rww_init(
        
        bv.bv_val = "0";
        bv.bv_len = 1;
-       attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+       attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
        
        mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
        e->e_private = ( void * )mp;
@@ -268,7 +268,7 @@ monitor_subsys_rww_update(
 
        snprintf( buf, sizeof( buf ), "%ld", num );
 
-       a = attr_find( e->e_attrs, mi->ad_monitorCounter );
+       a = attr_find( e->e_attrs, mi->mi_ad_monitorCounter );
        assert( a );
        free( a->a_vals[0].bv_val );
        ber_str2bv( buf, 0, 1, &a->a_vals[ 0 ] );
index a658a698ecc382d8a48d6877a4fd9a6a92d3bab0..63c09f486f992f1a9583a10bcdbafeec704e6bba 100644 (file)
@@ -85,8 +85,8 @@ monitor_subsys_sent_init(
                        "createTimestamp: %s\n"
                        "modifyTimestamp: %s\n",
                        monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val,
-                       mi->oc_monitorCounterObject->soc_cname.bv_val,
-                       mi->oc_monitorCounterObject->soc_cname.bv_val,
+                       mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+                       mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
                        mi->mi_startTime.bv_val,
                        mi->mi_startTime.bv_val );
 
@@ -109,7 +109,7 @@ monitor_subsys_sent_init(
        
        bv.bv_val = "0";
        bv.bv_len = 1;
-       attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+       attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
        
        mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
        e->e_private = ( void * )mp;
@@ -148,8 +148,8 @@ monitor_subsys_sent_init(
                        "createTimestamp: %s\n"
                        "modifyTimestamp: %s\n",
                        monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val,
-                       mi->oc_monitorCounterObject->soc_cname.bv_val,
-                       mi->oc_monitorCounterObject->soc_cname.bv_val,
+                       mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+                       mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
                        mi->mi_startTime.bv_val,
                        mi->mi_startTime.bv_val );
 
@@ -172,7 +172,7 @@ monitor_subsys_sent_init(
 
        bv.bv_val = "0";
        bv.bv_len = 1;
-       attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+       attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
        
        mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
        e->e_private = ( void * )mp;
@@ -211,8 +211,8 @@ monitor_subsys_sent_init(
                        "createTimestamp: %s\n"
                        "modifyTimestamp: %s\n",
                        monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val,
-                       mi->oc_monitorCounterObject->soc_cname.bv_val,
-                       mi->oc_monitorCounterObject->soc_cname.bv_val,
+                       mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+                       mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
                        mi->mi_startTime.bv_val,
                        mi->mi_startTime.bv_val );
 
@@ -235,7 +235,7 @@ monitor_subsys_sent_init(
 
        bv.bv_val = "0";
        bv.bv_len = 1;
-       attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+       attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
        
        mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
        e->e_private = ( void * )mp;
@@ -274,8 +274,8 @@ monitor_subsys_sent_init(
                        "createTimestamp: %s\n"
                        "modifyTimestamp: %s\n",
                        monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val,
-                       mi->oc_monitorCounterObject->soc_cname.bv_val,
-                       mi->oc_monitorCounterObject->soc_cname.bv_val,
+                       mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
+                       mi->mi_oc_monitorCounterObject->soc_cname.bv_val,
                        mi->mi_startTime.bv_val,
                        mi->mi_startTime.bv_val );
 
@@ -298,7 +298,7 @@ monitor_subsys_sent_init(
 
        bv.bv_val = "0";
        bv.bv_len = 1;
-       attr_merge_one( e, mi->ad_monitorCounter, &bv, NULL );
+       attr_merge_one( e, mi->mi_ad_monitorCounter, &bv, NULL );
        
        mp = ( struct monitorentrypriv * )ch_calloc( sizeof( struct monitorentrypriv ), 1 );
        e->e_private = ( void * )mp;
@@ -375,7 +375,7 @@ monitor_subsys_sent_update(
                Attribute       *a;
                char            buf[] = "+9223372036854775807L";
 
-               a = attr_find( e->e_attrs, mi->ad_monitorCounter);
+               a = attr_find( e->e_attrs, mi->mi_ad_monitorCounter);
                if ( a == NULL ) {
                        return( -1 );
                }
index 2796ebbf205a937eca33ca4fc5de446718cdc2f1..3621d6e58b4163b1b13b0d68ca59cacf947bc466 100644 (file)
@@ -76,7 +76,7 @@ monitor_subsys_thread_init(
        bv.bv_val = buf;
        bv.bv_len = strlen( bv.bv_val );
 
-       attr_merge_normalize_one( e, mi->ad_monitoredInfo, &bv, NULL );
+       attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo, &bv, NULL );
 
        monitor_cache_release( mi, e );
 
@@ -99,7 +99,7 @@ monitor_subsys_thread_update(
        snprintf( buf, sizeof( buf ), "backload=%d", 
                        ldap_pvt_thread_pool_backload( &connection_pool ) );
 
-       a = attr_find( e->e_attrs, mi->ad_monitoredInfo );
+       a = attr_find( e->e_attrs, mi->mi_ad_monitoredInfo );
        if ( a != NULL ) {
                for ( b = a->a_vals; b[0].bv_val != NULL; b++ ) {
                        if ( strncmp( b[0].bv_val, "backload=", 
@@ -116,7 +116,7 @@ monitor_subsys_thread_update(
 
                bv.bv_val = buf;
                bv.bv_len = strlen( buf );
-               attr_merge_normalize_one( e, mi->ad_monitoredInfo,
+               attr_merge_normalize_one( e, mi->mi_ad_monitoredInfo,
                                &bv, NULL );
        }
 
index 544e39f85b17bd8cfb25cd7bc10075ceedb13ad0..d9e4bc1b1c5941c61a69cae0e9fbc973f1b37bf5 100644 (file)
@@ -86,9 +86,9 @@ monitor_subsys_time_init(
                        "createTimestamp: %s\n"
                        "modifyTimestamp: %s\n", 
                        monitor_subsys[SLAPD_MONITOR_TIME].mss_dn.bv_val,
-                       mi->oc_monitoredObject->soc_cname.bv_val,
-                       mi->oc_monitoredObject->soc_cname.bv_val,
-                       mi->ad_monitorTimestamp->ad_cname.bv_val,
+                       mi->mi_oc_monitoredObject->soc_cname.bv_val,
+                       mi->mi_oc_monitoredObject->soc_cname.bv_val,
+                       mi->mi_ad_monitorTimestamp->ad_cname.bv_val,
                        mi->mi_startTime.bv_val,
                        mi->mi_startTime.bv_val,
                        mi->mi_startTime.bv_val );
@@ -148,9 +148,9 @@ monitor_subsys_time_init(
                        "createTimestamp: %s\n"
                        "modifyTimestamp: %s\n",
                        monitor_subsys[SLAPD_MONITOR_TIME].mss_dn.bv_val,
-                       mi->oc_monitoredObject->soc_cname.bv_val,
-                       mi->oc_monitoredObject->soc_cname.bv_val,
-                       mi->ad_monitorTimestamp->ad_cname.bv_val,
+                       mi->mi_oc_monitoredObject->soc_cname.bv_val,
+                       mi->mi_oc_monitoredObject->soc_cname.bv_val,
+                       mi->mi_ad_monitorTimestamp->ad_cname.bv_val,
                        mi->mi_startTime.bv_val,
                        mi->mi_startTime.bv_val,
                        mi->mi_startTime.bv_val );
@@ -239,7 +239,7 @@ monitor_subsys_time_update(
 
                len = strlen( tmbuf );
 
-               a = attr_find( e->e_attrs, mi->ad_monitorTimestamp );
+               a = attr_find( e->e_attrs, mi->mi_ad_monitorTimestamp );
                if ( a == NULL ) {
                        return( -1 );
                }