]> git.sur5r.net Git - openldap/commitdiff
SLAPD_SCHEMA_NOT_COMPAT: Add more three value filter logic code
authorKurt Zeilenga <kurt@openldap.org>
Wed, 24 May 2000 00:13:27 +0000 (00:13 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 24 May 2000 00:13:27 +0000 (00:13 +0000)
servers/slapd/filter.c
servers/slapd/search.c

index 4a4f592cf4b928725647fb1de5bffbf3c65c20e8..c2726057df759e7591c8364c097f095bd2b7b6a1 100644 (file)
@@ -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 );
 }
index 1ba7b3cad2d9be51ee03b375b5bb2e1d7960188d..acd1144495214a14c03b1b8e20b63760c1326209 100644 (file)
@@ -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 );