]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/filterentry.c
add new ber dump routine (behind NEW_LOGGING)
[openldap] / servers / slapd / filterentry.c
index bd3e62eaed3b187d0c59f20822e00718b06d9996..551f21c3d7a3fafea34db36d15811f0d305114ca 100644 (file)
@@ -21,7 +21,7 @@ static int    test_filter_and( Backend *be,
 static int     test_filter_or( Backend *be,
        Connection *conn, Operation *op,
        Entry *e, Filter *flist );
-static int     test_substring_filter( Backend *be,
+static int     test_substrings_filter( Backend *be,
        Connection *conn, Operation *op,
        Entry *e, Filter *f);
 static int     test_ava_filter( Backend *be,
@@ -75,7 +75,7 @@ test_filter(
 
        case LDAP_FILTER_SUBSTRINGS:
                Debug( LDAP_DEBUG_FILTER, "    SUBSTRINGS\n", 0, 0, 0 );
-               rc = test_substring_filter( be, conn, op, e, f );
+               rc = test_substrings_filter( be, conn, op, e, f );
                break;
 
        case LDAP_FILTER_GE:
@@ -171,6 +171,8 @@ test_ava_filter(
                        mr = a->a_desc->ad_type->sat_approx;
                        if( mr != NULL ) break;
 
+                       /* use EQUALITY matching rule if no APPROX rule */
+
                case LDAP_FILTER_EQUALITY:
                        mr = a->a_desc->ad_type->sat_equality;
                        break;
@@ -193,7 +195,7 @@ test_ava_filter(
                        int rc;
                        const char *text;
 
-                       rc = value_match( &ret, a->a_desc, mr,
+                       rc = value_match( &ret, a->a_desc, mr, 0,
                                a->a_vals[i], ava->aa_value,
                                &text );
 
@@ -310,7 +312,7 @@ test_filter_or(
 
 
 static int
-test_substring_filter(
+test_substrings_filter(
     Backend    *be,
     Connection *conn,
     Operation  *op,
@@ -320,7 +322,7 @@ test_substring_filter(
 {
        Attribute       *a;
 
-       Debug( LDAP_DEBUG_FILTER, "begin test_substring_filter\n", 0, 0, 0 );
+       Debug( LDAP_DEBUG_FILTER, "begin test_substrings_filter\n", 0, 0, 0 );
 
        if ( be != NULL && ! access_allowed( be, conn, op, e,
                f->f_sub_desc, NULL, ACL_SEARCH ) )
@@ -344,7 +346,7 @@ test_substring_filter(
                        int rc;
                        const char *text;
 
-                       rc = value_match( &ret, a->a_desc, mr,
+                       rc = value_match( &ret, a->a_desc, mr, 0,
                                a->a_vals[i], f->f_sub,
                                &text );
 
@@ -358,6 +360,6 @@ test_substring_filter(
                }
        }
 
-       Debug( LDAP_DEBUG_FILTER, "end test_substring_filter 1\n", 0, 0, 0 );
+       Debug( LDAP_DEBUG_FILTER, "end test_substrings_filter 1\n", 0, 0, 0 );
        return LDAP_COMPARE_FALSE;
 }