version 1.71, 2002/01/06 05:21:30
|
version 1.74, 2002/03/04 21:26:47
|
Line 1
|
Line 1
|
/* filter.c - routines for parsing and dealing with filters */ |
/* filter.c - routines for parsing and dealing with filters */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.70 2002/01/06 05:11:01 hyc Exp $ */ |
/* $OpenLDAP: pkg/ldap/servers/slapd/filter.c,v 1.73 2002/03/01 17:52:45 kurt Exp $ */ |
/* |
/* |
* Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved. |
* Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved. |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file |
Line 281 get_filter(
|
Line 281 get_filter(
|
#else |
#else |
Debug( LDAP_DEBUG_FILTER, "OR\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_FILTER, "OR\n", 0, 0, 0 ); |
#endif |
#endif |
err = get_filter_list( conn, ber, &f->f_and, &ftmp, text ); |
err = get_filter_list( conn, ber, &f->f_or, &ftmp, text ); |
if ( err != LDAP_SUCCESS ) { |
if ( err != LDAP_SUCCESS ) { |
break; |
break; |
} |
} |
Line 534 get_substring_filter(
|
Line 534 get_substring_filter(
|
goto return_error; |
goto return_error; |
} |
} |
|
|
rc = value_normalize( f->f_sub_desc, usage, &value, &bv, text ); |
/* valiate using equality matching rule validator! */ |
|
rc = value_validate( f->f_sub_desc->ad_type->sat_equality, |
|
&value, text ); |
|
if( rc != LDAP_SUCCESS ) { |
|
goto return_error; |
|
} |
|
|
|
rc = value_normalize( f->f_sub_desc, usage, |
|
&value, &bv, text ); |
if( rc != LDAP_SUCCESS ) { |
if( rc != LDAP_SUCCESS ) { |
goto return_error; |
goto return_error; |
} |
} |
Line 589 get_substring_filter(
|
Line 596 get_substring_filter(
|
goto return_error; |
goto return_error; |
} |
} |
|
|
bvarray_add( &f->f_sub_any, &value ); |
ber_bvarray_add( &f->f_sub_any, &value ); |
|
|
if( fstr->bv_val ) { |
if( fstr->bv_val ) { |
int i = fstr->bv_len; |
int i = fstr->bv_len; |
Line 660 return_error:
|
Line 667 return_error:
|
} |
} |
|
|
free( f->f_sub_initial.bv_val ); |
free( f->f_sub_initial.bv_val ); |
bvarray_free( f->f_sub_any ); |
ber_bvarray_free( f->f_sub_any ); |
free( f->f_sub_final.bv_val ); |
free( f->f_sub_final.bv_val ); |
ch_free( f->f_sub ); |
ch_free( f->f_sub ); |
return rc; |
return rc; |
Line 711 filter_free( Filter *f )
|
Line 718 filter_free( Filter *f )
|
if ( f->f_sub_initial.bv_val != NULL ) { |
if ( f->f_sub_initial.bv_val != NULL ) { |
free( f->f_sub_initial.bv_val ); |
free( f->f_sub_initial.bv_val ); |
} |
} |
bvarray_free( f->f_sub_any ); |
ber_bvarray_free( f->f_sub_any ); |
if ( f->f_sub_final.bv_val != NULL ) { |
if ( f->f_sub_final.bv_val != NULL ) { |
free( f->f_sub_final.bv_val ); |
free( f->f_sub_final.bv_val ); |
} |
} |