/* filterindex.c - generate the list of candidate entries from a filter */
/* $OpenLDAP$ */
/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
"filter_candidates: EQUALITY (%s),(%s)\n",
f->f_ava->aa_desc->ad_cname.bv_val,
- f->f_ava->aa_value->bv_val ));
+ f->f_ava->aa_value.bv_val ));
#else
Debug( LDAP_DEBUG_FILTER, "\tEQUALITY\n", 0, 0, 0 );
#endif
LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
"filter_candidates: APPROX (%s), (%s)\n",
f->f_ava->aa_desc->ad_cname.bv_val,
- f->f_ava->aa_value->bv_val ));
+ f->f_ava->aa_value.bv_val ));
#else
Debug( LDAP_DEBUG_FILTER, "\tAPPROX\n", 0, 0, 0 );
#endif
Debug( LDAP_DEBUG_FILTER, "\tGE\n", 0, 0, 0 );
#endif
- result = presence_candidates( be, f->f_desc );
+ result = presence_candidates( be, f->f_ava->aa_desc );
break;
case LDAP_FILTER_LE:
Debug( LDAP_DEBUG_FILTER, "\tLE\n", 0, 0, 0 );
#endif
- result = presence_candidates( be, f->f_desc );
+ result = presence_candidates( be, f->f_ava->aa_desc );
break;
case LDAP_FILTER_AND:
*/
result = idl_allids( be );
break;
+ default:
+#ifdef NEW_LOGGING
+ LDAP_LOG(( "filter", LDAP_LEVEL_DETAIL1,
+ "filter_candidates: UNKNOWN\n" ));
+#else
+ Debug( LDAP_DEBUG_FILTER, "\tUNKNOWN\n", 0, 0, 0 );
+#endif
+ /* unknown filters must not return NULL, to allow
+ * extended filter processing to be done later.
+ */
+ result = idl_allids( be );
+ break;
}
#ifdef NEW_LOGGING
char *dbname;
slap_mask_t mask;
struct berval prefix = {0};
- struct berval **keys = NULL;
+ struct berval *keys = NULL;
MatchingRule *mr;
#ifdef NEW_LOGGING
ava->aa_desc->ad_type->sat_syntax,
mr,
&prefix,
- ava->aa_value,
+ &ava->aa_value,
&keys );
if( rc != LDAP_SUCCESS ) {
return idl;
}
- for ( i= 0; keys[i] != NULL; i++ ) {
+ for ( i= 0; keys[i].bv_val != NULL; i++ ) {
ID_BLOCK *save;
ID_BLOCK *tmp;
- rc = key_read( be, db, keys[i], &tmp );
+ rc = key_read( be, db, &keys[i], &tmp );
if( rc != LDAP_SUCCESS ) {
idl_free( idl );
if( idl == NULL ) break;
}
- ber_bvecfree( keys );
+ ber_bvarray_free( keys );
ldbm_cache_close( be, db );
char *dbname;
slap_mask_t mask;
struct berval prefix = {0};
- struct berval **keys = NULL;
+ struct berval *keys = NULL;
MatchingRule *mr;
#ifdef NEW_LOGGING
ava->aa_desc->ad_type->sat_syntax,
mr,
&prefix,
- ava->aa_value,
+ &ava->aa_value,
&keys );
if( rc != LDAP_SUCCESS ) {
return idl;
}
- for ( i= 0; keys[i] != NULL; i++ ) {
+ for ( i= 0; keys[i].bv_val != NULL; i++ ) {
ID_BLOCK *save;
ID_BLOCK *tmp;
- rc = key_read( be, db, keys[i], &tmp );
+ rc = key_read( be, db, &keys[i], &tmp );
if( rc != LDAP_SUCCESS ) {
idl_free( idl );
if( idl == NULL ) break;
}
- ber_bvecfree( keys );
+ ber_bvarray_free( keys );
ldbm_cache_close( be, db );
char *dbname;
slap_mask_t mask;
struct berval prefix = {0};
- struct berval **keys = NULL;
+ struct berval *keys = NULL;
MatchingRule *mr;
#ifdef NEW_LOGGING
return idl;
}
- for ( i= 0; keys[i] != NULL; i++ ) {
+ for ( i= 0; keys[i].bv_val != NULL; i++ ) {
ID_BLOCK *save;
ID_BLOCK *tmp;
- rc = key_read( be, db, keys[i], &tmp );
+ rc = key_read( be, db, &keys[i], &tmp );
if( rc != LDAP_SUCCESS ) {
idl_free( idl );
if( idl == NULL ) break;
}
- ber_bvecfree( keys );
+ ber_bvarray_free( keys );
ldbm_cache_close( be, db );