]> git.sur5r.net Git - openldap/commitdiff
component cleanup
authorKurt Zeilenga <kurt@openldap.org>
Sat, 18 Sep 2004 02:32:06 +0000 (02:32 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 18 Sep 2004 02:32:06 +0000 (02:32 +0000)
servers/slapd/component.c
servers/slapd/filterentry.c
servers/slapd/mra.c
servers/slapd/slap.h

index 75920a06e3b905dd9ed6c3a5fda5e7e4dd33234c..d0b7e0af61d6f15813977f50914fb9e03bd9eb2c 100644 (file)
@@ -762,7 +762,7 @@ test_comp_filter_entry(
        Attribute *a;
        void    *memctx;
 
-       mra->cf->cf_ca->ca_mra = mra;
+       mra->ma_cf->cf_ca->ca_mra = mra;
 
        Debug( LDAP_DEBUG_FILTER, "test_comp_filter_entry\n", 0, 0, 0 );
        if ( mra->ma_desc ) {
@@ -785,7 +785,7 @@ test_comp_filter_entry(
                        for ( ; bv->bv_val != NULL ; bv++ ) {
                                int ret, rc;
                                const char *text;
-                               rc = test_comp_filter_attr( op, a, bv, mra->cf );
+                               rc = test_comp_filter_attr( op, a, bv, mra->ma_cf );
                                if ( rc == LDAP_COMPARE_TRUE ) return rc;
                        }
                }
@@ -816,7 +816,7 @@ test_comp_filter_entry(
                        for ( ; bv->bv_val != NULL ; bv++ ) {
                                int ret, rc;
                                const char *text;
-                               rc = test_comp_filter_attr( op, a, bv, mra->cf );
+                               rc = test_comp_filter_attr( op, a, bv, mra->ma_cf );
                                if ( rc == LDAP_COMPARE_TRUE ) break;
                        }
                         if ( rc != LDAP_SUCCESS ) return rc;
index d70b640a260e7e69ce56e1b022fbcd81cfd1a6b9..1717019aa89b1a33d90c317536b3a8ebf25fdbbd 100644 (file)
@@ -165,7 +165,7 @@ static int test_mra_filter(
 
 #ifdef LDAP_COMP_MATCH
        /* Component Matching */
-       if( mra->cf && mra->ma_rule->smr_usage & SLAP_MR_COMPONENT ) {
+       if( mra->ma_cf && mra->ma_rule->smr_usage & SLAP_MR_COMPONENT ) {
                return test_comp_filter_entry( op, e, mra );
        }
 #endif
index d9e1ec622647156e900da3cfd4134896095d60d7..7d43bba1f0e942ba87fb845f94d8a1f6326920c3 100644 (file)
@@ -180,17 +180,19 @@ get_mra(
                SLAP_MR_EXT|SLAP_MR_VALUE_OF_ASSERTION_SYNTAX,
                &value, &ma.ma_value, text, op->o_tmpmemctx );
 
-       if( rc != LDAP_SUCCESS ) {
-               return rc;
-       }
+       if( rc != LDAP_SUCCESS ) return rc;
 
 #ifdef LDAP_COMP_MATCH
        /* Matching Rule for Component Matching */
-       Debug( LDAP_DEBUG_FILTER, "matchingrule %s\n",ma.ma_rule->smr_mrule.mr_oid,0,0);
-       if( ma.ma_rule && ma.ma_rule->smr_usage & SLAP_MR_COMPONENT )
-               rc = get_comp_filter( op, &ma.ma_value, &ma.cf, text );
+       Debug( LDAP_DEBUG_FILTER, "matchingrule %s\n",
+               ma.ma_rule->smr_mrule.mr_oid, 0, 0);
+
+       if( ma.ma_rule && ma.ma_rule->smr_usage & SLAP_MR_COMPONENT ) {
+               rc = get_comp_filter( op, &ma.ma_value, &ma.ma_cf, text );
                if ( rc != LDAP_SUCCESS ) return rc;
+       }
 #endif
+
        length = sizeof(ma);
        /* Append rule_text to end of struct */
        if (rule_text.bv_val) length += rule_text.bv_len + 1;
index 574c1b684092184a1fe0d4d69dc9417aaf142804..57f0b0fd8ea2a6d655d7f1d778d41a5b578e31e8 100644 (file)
 
 #include "ldap_defaults.h"
 
-#ifdef HAVE_GMP
-#include <gmp.h>
-#endif /* HAVE_GMP */
-
 #include <stdio.h>
 #include <ac/stdlib.h>
 
 #include <ac/time.h>
 #include <ac/param.h>
 
+#ifdef HAVE_GMP
+#include <gmp.h>
+#endif /* HAVE_GMP */
+
 #include "avl.h"
 
 #ifndef ldap_debug
@@ -383,7 +383,7 @@ typedef struct slap_syntax {
 #endif
 #ifdef LDAP_COMP_MATCH
        slap_component_transform_func *ssyn_attr2comp;
-       struct ComponentDesc* comp_syntax;
+       struct ComponentDesc* ssync_comp_syntax;
 #endif
 
        LDAP_SLIST_ENTRY(slap_syntax) ssyn_next;
@@ -923,7 +923,7 @@ typedef struct slap_mr_assertion {
        int                                             ma_dnattrs; /* boolean */
        struct berval           ma_value;       /* required */
 #ifdef LDAP_COMP_MATCH
-       struct slap_component_filter* cf;
+       struct slap_component_filter* ma_cf; /* component filter */
 #endif
 } MatchingRuleAssertion;
 
@@ -1050,7 +1050,7 @@ typedef struct slap_attr {
 #define SLAP_ATTR_IXADD                0x1U
 #define SLAP_ATTR_IXDEL                0x2U
 #ifdef LDAP_COMP_MATCH
-       void* component_values;
+       void* a_component_values; /* component values */
 #endif
 } Attribute;