From: Pierangelo Masarati Date: Mon, 12 Apr 2010 18:01:37 +0000 (+0000) Subject: handle ordered values as appropriate (ITS#6516) X-Git-Tag: MIGRATION_CVS2GIT~635 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=97020812015bc142e5b43ec8d6ff7bbf80e36daa;p=openldap handle ordered values as appropriate (ITS#6516) --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 4bb3efbc11..302fe56d1e 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -744,12 +744,12 @@ ldap_build_entry( int rc; if ( pretty ) { - rc = pretty( attr->a_desc->ad_type->sat_syntax, + rc = ordered_value_pretty( attr->a_desc, &attr->a_vals[i], &pval, NULL ); } else { - rc = validate( attr->a_desc->ad_type->sat_syntax, - &attr->a_vals[i] ); + rc = ordered_value_validate( attr->a_desc, + &attr->a_vals[i], 0 ); } if ( rc != LDAP_SUCCESS ) { @@ -793,9 +793,9 @@ ldap_build_entry( for ( i = 0; i < last; i++ ) { int rc; - rc = attr->a_desc->ad_type->sat_equality->smr_normalize( + rc = ordered_value_normalize( SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX, - attr->a_desc->ad_type->sat_syntax, + attr->a_desc, attr->a_desc->ad_type->sat_equality, &attr->a_vals[i], &attr->a_nvals[i], NULL ); diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index c729ea2922..e4ba48359a 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -2045,12 +2045,12 @@ remove_oc:; int rc; if ( pretty ) { - rc = pretty( attr->a_desc->ad_type->sat_syntax, + rc = ordered_value_pretty( attr->a_desc, &attr->a_vals[i], &pval, NULL ); } else { - rc = validate( attr->a_desc->ad_type->sat_syntax, - &attr->a_vals[i] ); + rc = ordered_value_validate( attr->a_desc, + &attr->a_vals[i], 0 ); } if ( rc ) { @@ -2085,9 +2085,9 @@ remove_oc:; attr->a_nvals = ch_malloc( ( last + 1 ) * sizeof( struct berval ) ); for ( i = 0; ia_desc->ad_type->sat_equality->smr_normalize( + if ( ordered_value_normalize( SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX, - attr->a_desc->ad_type->sat_syntax, + attr->a_desc, attr->a_desc->ad_type->sat_equality, &attr->a_vals[i], &attr->a_nvals[i], NULL )) {