From: Kurt Zeilenga Date: Wed, 24 May 2000 00:13:27 +0000 (+0000) Subject: SLAPD_SCHEMA_NOT_COMPAT: Add more three value filter logic code X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~2885 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6ddde559649af10e3809dc4a897bc8cc2698f1fa;p=openldap SLAPD_SCHEMA_NOT_COMPAT: Add more three value filter logic code --- diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index 4a4f592cf4..c2726057df 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -312,17 +312,28 @@ get_filter( break; } + free( ftmp ); + if ( err != LDAP_SUCCESS ) { - free( (char *) f ); if ( *fstr != NULL ) { free( *fstr ); } + + if( err != SLAPD_DISCONNECT ) { + /* ignore error */ + f->f_choice = SLAPD_FILTER_COMPUTED; + f->f_result = SLAPD_COMPARE_UNDEFINED; + *fstr = ch_strdup( "(badfilter)" ); + err = LDAP_SUCCESS; + *filt = f; + + } else { + free(f); + } } else { *filt = f; } - free( ftmp ); - Debug( LDAP_DEBUG_FILTER, "end get_filter %d\n", err, 0, 0 ); return( err ); } diff --git a/servers/slapd/search.c b/servers/slapd/search.c index 1ba7b3cad2..acd1144495 100644 --- a/servers/slapd/search.c +++ b/servers/slapd/search.c @@ -114,7 +114,8 @@ do_search( attrsonly); /* filter - returns a "normalized" version */ - if ( (rc = get_filter( conn, op->o_ber, &filter, &fstr, &text )) != LDAP_SUCCESS ) { + rc = get_filter( conn, op->o_ber, &filter, &fstr, &text ); + if( rc != LDAP_SUCCESS ) { if( rc == SLAPD_DISCONNECT ) { send_ldap_disconnect( conn, op, LDAP_PROTOCOL_ERROR, text );