mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
component cleanup
This commit is contained in:
parent
ffbb5d4ed2
commit
7f773613f8
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -29,10 +29,6 @@
|
||||
|
||||
#include "ldap_defaults.h"
|
||||
|
||||
#ifdef HAVE_GMP
|
||||
#include <gmp.h>
|
||||
#endif /* HAVE_GMP */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <ac/stdlib.h>
|
||||
|
||||
@ -44,6 +40,10 @@
|
||||
#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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user