From: Kurt Zeilenga Date: Sat, 18 Sep 2004 02:32:06 +0000 (+0000) Subject: component cleanup X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~520 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7f773613f8486b1ce4ed30efba4520e0249fd202;p=openldap component cleanup --- diff --git a/servers/slapd/component.c b/servers/slapd/component.c index 75920a06e3..d0b7e0af61 100644 --- a/servers/slapd/component.c +++ b/servers/slapd/component.c @@ -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; diff --git a/servers/slapd/filterentry.c b/servers/slapd/filterentry.c index d70b640a26..1717019aa8 100644 --- a/servers/slapd/filterentry.c +++ b/servers/slapd/filterentry.c @@ -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 diff --git a/servers/slapd/mra.c b/servers/slapd/mra.c index d9e1ec6226..7d43bba1f0 100644 --- a/servers/slapd/mra.c +++ b/servers/slapd/mra.c @@ -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; diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index 574c1b6840..57f0b0fd8e 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -29,10 +29,6 @@ #include "ldap_defaults.h" -#ifdef HAVE_GMP -#include -#endif /* HAVE_GMP */ - #include #include @@ -44,6 +40,10 @@ #include #include +#ifdef HAVE_GMP +#include +#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;