Skip to content
Snippets Groups Projects
Commit c24ebfe0 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

SLAP_NVALUE: misc updates

parent 603543ca
Branches
Tags
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment