mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-04-24 15:32:22 +08:00
SLAP_NVALUE: misc updates
This commit is contained in:
parent
603543ca26
commit
c24ebfe014
@ -81,7 +81,15 @@ monitor_back_compare(
|
||||
a = attrs_find( a->a_next, ava->aa_desc )) {
|
||||
rc = LDAP_COMPARE_FALSE;
|
||||
|
||||
if ( value_find( ava->aa_desc, a->a_vals, &ava->aa_value ) == 0 ) {
|
||||
#ifdef SLAP_NVALUES
|
||||
if ( value_find_ex( ava->aa_desc,
|
||||
SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH,
|
||||
a->a_nvals ? a->a_nvals : a->a_vals,
|
||||
&ava->aa_value ) == 0 )
|
||||
#else
|
||||
if ( value_find( ava->aa_desc, a->a_vals, &ava->aa_value ) == 0 )
|
||||
#endif
|
||||
{
|
||||
rc = LDAP_COMPARE_TRUE;
|
||||
break;
|
||||
}
|
||||
|
@ -319,11 +319,20 @@ add_values( Entry *e, Modification *mod, int *newlevel )
|
||||
const char *text = NULL;
|
||||
struct berval asserted;
|
||||
|
||||
#ifdef SLAP_NVALUES
|
||||
rc = asserted_value_validate_normalize(
|
||||
mod->sm_desc, mr,
|
||||
SLAP_MR_EQUALITY,
|
||||
&mod->sm_bvalues[i],
|
||||
&asserted,
|
||||
&text );
|
||||
#else
|
||||
rc = value_normalize( mod->sm_desc,
|
||||
SLAP_MR_EQUALITY,
|
||||
&mod->sm_bvalues[i],
|
||||
&asserted,
|
||||
&text );
|
||||
#endif
|
||||
|
||||
if ( rc != LDAP_SUCCESS ) {
|
||||
return rc;
|
||||
@ -403,11 +412,20 @@ delete_values( Entry *e, Modification *mod, int *newlevel )
|
||||
|
||||
struct berval asserted;
|
||||
|
||||
#ifdef SLAP_NVALUES
|
||||
rc = asserted_value_validate_normalize(
|
||||
mod->sm_desc, mr,
|
||||
SLAP_MR_EQUALITY,
|
||||
&mod->sm_bvalues[i],
|
||||
&asserted,
|
||||
&text );
|
||||
#else
|
||||
rc = value_normalize( mod->sm_desc,
|
||||
SLAP_MR_EQUALITY,
|
||||
&mod->sm_bvalues[i],
|
||||
&asserted,
|
||||
&text );
|
||||
#endif
|
||||
|
||||
if( rc != LDAP_SUCCESS ) return rc;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user