]> git.sur5r.net Git - openldap/commitdiff
further cleanup
authorPierangelo Masarati <ando@openldap.org>
Sat, 13 Nov 2004 14:57:39 +0000 (14:57 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 13 Nov 2004 14:57:39 +0000 (14:57 +0000)
servers/slapd/back-monitor/back-monitor.h
servers/slapd/back-monitor/database.c
servers/slapd/back-monitor/init.c

index bc3a0842c14ced717b179f281ccf94cb7d2c7993..e1e8bcad7dd8d483a5c69865c868c6353304c543 100644 (file)
@@ -29,6 +29,9 @@
 
 LDAP_BEGIN_DECL
 
+/* define if si_ad_labeledURI is removed from slap_schema */
+#undef MONITOR_DEFINE_LABELEDURI
+
 typedef struct monitor_callback_t {
        int                     (*mc_update)( Operation *op, Entry *e, void *priv );
                                                /* update callback
@@ -106,7 +109,10 @@ typedef struct monitor_info_t {
        AttributeDescription    *mi_ad_description;
        AttributeDescription    *mi_ad_seeAlso;
        AttributeDescription    *mi_ad_l;
+#ifdef MONITOR_DEFINE_LABELEDURI
+       /* enable if si_ad_labeledURI is removed from slap_schema */
        AttributeDescription    *mi_ad_labeledURI;
+#endif /* MONITOR_DEFINE_LABELEDURI */
        AttributeDescription    *mi_ad_readOnly;
        AttributeDescription    *mi_ad_restrictedOperation;
 
index 46c4c2058e554faac23a23360ba6a7552b73a2ec..785305ca17c77553f8bfd1abce26feb4a3e4fa57 100644 (file)
@@ -252,7 +252,7 @@ monitor_subsys_database_init(
 
                        bv.bv_val = li->url;
                        bv.bv_len = strlen( bv.bv_val );
-                       attr_merge_normalize_one( e, mi->mi_ad_labeledURI,
+                       attr_merge_normalize_one( e, slap_schema.si_ad_labeledURI,
                                        &bv, NULL );
                }
 #endif /* defined(SLAPD_LDAP) */
index 35be64d30078a1d136f206075527ad2718e55b36..23d93e0c022b7b9cdb966bfe2afa0263ef9d24ff 100644 (file)
@@ -392,7 +392,7 @@ monitor_filter2ndn( struct berval *base, int scope, struct berval *filter,
        Operation       op = { 0 };
        SlapReply       rs = { 0 };
        slap_callback   cb = { NULL, monitor_filter2ndn_cb, NULL, NULL };
-       AttributeName   anlist[ 2 ] = { { 0 }, { 0 } };
+       AttributeName   anlist[ 2 ];
        int             rc;
 
        BER_BVZERO( ndn );
@@ -431,6 +431,7 @@ monitor_filter2ndn( struct berval *base, int scope, struct berval *filter,
        op.ors_filter = str2filter_x( &op, filter->bv_val );
        op.ors_attrs = anlist;
        BER_BVSTR( &anlist[ 0 ].an_name, LDAP_NO_ATTRS );
+       BER_BVZERO( &anlist[ 1 ].an_name );
        op.ors_attrsonly = 0;
        op.ors_tlimit = SLAP_NO_LIMIT;
        op.ors_slimit = 1;
@@ -943,12 +944,14 @@ monitor_back_db_init(
                        "DESC 'RFC2256: locality which this object resides in' "
                        "SUP name )", 0,
                        offsetof(monitor_info_t, mi_ad_l) },
+#ifdef MONITOR_DEFINE_LABELEDURI
                { "labeledURI", "( 1.3.6.1.4.1.250.1.57 "
                        "NAME 'labeledURI' "
                        "DESC 'RFC2079: Uniform Resource Identifier with optional label' "
                        "EQUALITY caseExactMatch "
                        "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )", 0,
                        offsetof(monitor_info_t, mi_ad_labeledURI) },
+#endif /* MONITOR_DEFINE_LABELEDURI */
                { NULL, NULL, 0, -1 }
        };