From: Kurt Zeilenga Date: Tue, 23 May 2000 23:52:25 +0000 (+0000) Subject: SLAPD_SCHEMA_NOT_COMPAT: at least make filters not loop X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2886 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3657e63a17ea2d9fdc9a041f9ebc25fc3829df63;p=openldap SLAPD_SCHEMA_NOT_COMPAT: at least make filters not loop --- diff --git a/servers/slapd/filterentry.c b/servers/slapd/filterentry.c index e61922e79f..77f191256b 100644 --- a/servers/slapd/filterentry.c +++ b/servers/slapd/filterentry.c @@ -260,7 +260,9 @@ test_ava_filter( for ( i = 0; a->a_vals[i] != NULL; i++ ) { int rc; -#ifndef SLAPD_SCHEMA_NOT_COMPAT +#ifdef SLAPD_SCHEMA_NOT_COMPAT + rc = 0; +#else rc = value_cmp( a->a_vals[i], &ava->ava_value, a->a_syntax, 3 ); #endif diff --git a/servers/slapd/value.c b/servers/slapd/value.c index 21538c23e1..ec7bc11f84 100644 --- a/servers/slapd/value.c +++ b/servers/slapd/value.c @@ -128,13 +128,18 @@ value_normalize( return LDAP_INAPPROPRIATE_MATCHING; } - rc = (mr->smr_normalize)( usage, - ad->ad_type->sat_syntax, - mr, in, out ); + if( mr->smr_normalize ) { + rc = (mr->smr_normalize)( usage, + ad->ad_type->sat_syntax, + mr, in, out ); + + if( rc != LDAP_SUCCESS ) { + *text = "unable to normalize value"; + return LDAP_INVALID_SYNTAX; + } - if( rc != LDAP_SUCCESS ) { - *text = "unable to normalize value"; - return LDAP_INVALID_SYNTAX; + } else { + *out = ber_bvdup( in ); } return LDAP_SUCCESS;