mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
blind fix of value_match when SLAP_NVALUES is set
This commit is contained in:
parent
837c7eb78e
commit
a26cca88dd
1 changed files with 11 additions and 0 deletions
|
|
@ -2435,8 +2435,14 @@ int slapi_attr_value_cmp( const Slapi_Attr *a, const struct berval *v1, const st
|
|||
const char *text;
|
||||
|
||||
mr = a->a_desc->ad_type->sat_equality;
|
||||
#ifdef SLAP_NVALUES
|
||||
rc = value_match( &ret, a->a_desc, mr,
|
||||
SLAP_MR_VALUE_OF_ASSERTION_SYNTAX,
|
||||
(struct berval *)v1, (void *)v2, &text );
|
||||
#else
|
||||
rc = value_match( &ret, a->a_desc, mr, SLAP_MR_ASSERTION_SYNTAX_MATCH,
|
||||
(struct berval *)v1, (void *)v2, &text );
|
||||
#endif
|
||||
if ( rc != LDAP_SUCCESS )
|
||||
return -1;
|
||||
|
||||
|
|
@ -2458,8 +2464,13 @@ int slapi_attr_value_find( const Slapi_Attr *a, struct berval *v )
|
|||
|
||||
mr = a->a_desc->ad_type->sat_equality;
|
||||
for ( bv = a->a_vals, j = 0; bv->bv_val != NULL; bv++, j++ ) {
|
||||
#ifdef SLAP_NVALUES
|
||||
rc = value_match( &ret, a->a_desc, mr,
|
||||
SLAP_MR_VALUE_OF_ASSERTION_SYNTAX, bv, v, &text );
|
||||
#else
|
||||
rc = value_match( &ret, a->a_desc, mr,
|
||||
SLAP_MR_ASSERTION_SYNTAX_MATCH, bv, v, &text );
|
||||
#endif
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue