From c24ebfe014d79fbc2724db5bd334739efad4d1c4 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 1 Mar 2003 04:14:17 +0000 Subject: [PATCH] SLAP_NVALUE: misc updates --- servers/slapd/back-monitor/compare.c | 10 +++++++++- servers/slapd/back-monitor/log.c | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-monitor/compare.c b/servers/slapd/back-monitor/compare.c index d3846a0746..32885e0b51 100644 --- a/servers/slapd/back-monitor/compare.c +++ b/servers/slapd/back-monitor/compare.c @@ -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; } diff --git a/servers/slapd/back-monitor/log.c b/servers/slapd/back-monitor/log.c index 2fd6e4d454..0f85ce6fd9 100644 --- a/servers/slapd/back-monitor/log.c +++ b/servers/slapd/back-monitor/log.c @@ -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; -- 2.39.5