]> git.sur5r.net Git - openldap/commitdiff
SLAP_NVALUE: misc updates
authorKurt Zeilenga <kurt@openldap.org>
Sat, 1 Mar 2003 04:14:17 +0000 (04:14 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 1 Mar 2003 04:14:17 +0000 (04:14 +0000)
servers/slapd/back-monitor/compare.c
servers/slapd/back-monitor/log.c

index d3846a07464c6fa74ed86c7ba50f332ce47bf275..32885e0b51a30873ebe00783c04cbe3dd6252335 100644 (file)
@@ -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;
                }
index 2fd6e4d454c53d7e586ef7906777a3de47cf4760..0f85ce6fd9f05b5cdb7efdcf14ee296b7f06be6f 100644 (file)
@@ -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;