#else
Debug( LDAP_DEBUG_FILTER, "PRESENT\n", 0, 0, 0 );
#endif
#else
Debug( LDAP_DEBUG_FILTER, "PRESENT\n", 0, 0, 0 );
#endif
f->f_result = LDAP_COMPARE_FALSE;
ber_str2bv("(unrecognized=*)",
sizeof("(unrecognized=*)")-1, 1, fstr);
f->f_result = LDAP_COMPARE_FALSE;
ber_str2bv("(unrecognized=*)",
sizeof("(unrecognized=*)")-1, 1, fstr);
fstr->bv_len = sizeof("(=*)") - 1
+ f->f_desc->ad_cname.bv_len;
fstr->bv_val = ch_malloc( fstr->bv_len + 1);
fstr->bv_len = sizeof("(=*)") - 1
+ f->f_desc->ad_cname.bv_len;
fstr->bv_val = ch_malloc( fstr->bv_len + 1);
#else
Debug( LDAP_DEBUG_FILTER, "begin get_substring_filter\n", 0, 0, 0 );
#endif
#else
Debug( LDAP_DEBUG_FILTER, "begin get_substring_filter\n", 0, 0, 0 );
#endif
- rc = slap_bv2ad( &type, &f->f_sub_desc, text );
-
- ch_free( type.bv_val );
+ rc = slap_bv2ad( &bv, &f->f_sub_desc, text );
- rc = value_normalize( f->f_sub_desc, usage, value, &nvalue, text );
- ber_bvfree( value );
+ rc = value_normalize( f->f_sub_desc, usage, &value, &bv, text );
Debug( LDAP_DEBUG_FILTER, " INITIAL\n", 0, 0, 0 );
#endif
Debug( LDAP_DEBUG_FILTER, " INITIAL\n", 0, 0, 0 );
#endif
fstr->bv_len += escaped.bv_len;
fstr->bv_val = ch_realloc( fstr->bv_val,
fstr->bv_len + 1 );
fstr->bv_len += escaped.bv_len;
fstr->bv_val = ch_realloc( fstr->bv_val,
fstr->bv_len + 1 );
Debug( LDAP_DEBUG_FILTER, " ANY\n", 0, 0, 0 );
#endif
Debug( LDAP_DEBUG_FILTER, " ANY\n", 0, 0, 0 );
#endif
fstr->bv_len += escaped.bv_len + 2;
fstr->bv_val = ch_realloc( fstr->bv_val,
fstr->bv_len + 1 );
fstr->bv_len += escaped.bv_len + 2;
fstr->bv_val = ch_realloc( fstr->bv_val,
fstr->bv_len + 1 );
Debug( LDAP_DEBUG_FILTER, " FINAL\n", 0, 0, 0 );
#endif
Debug( LDAP_DEBUG_FILTER, " FINAL\n", 0, 0, 0 );
#endif
fstr->bv_len += escaped.bv_len + 2;
fstr->bv_val = ch_realloc( fstr->bv_val,
fstr->bv_len + 1 );
fstr->bv_len += escaped.bv_len + 2;
fstr->bv_val = ch_realloc( fstr->bv_val,
fstr->bv_len + 1 );
- ber_bvfree( f->f_sub_initial );
- ber_bvecfree( f->f_sub_any );
- ber_bvfree( f->f_sub_final );
+ free( f->f_sub_initial.bv_val );
+ bvarray_free( f->f_sub_any );
+ free( f->f_sub_final.bv_val );
- ber_bvecfree( f->f_sub_any );
- if ( f->f_sub_final != NULL ) {
- ber_bvfree( f->f_sub_final );
+ bvarray_free( f->f_sub_any );
+ if ( f->f_sub_final.bv_val != NULL ) {
+ free( f->f_sub_final.bv_val );
fprintf( stderr, "(%s=%s)",
f->f_av_desc->ad_cname.bv_val,
escaped.bv_val );
fprintf( stderr, "(%s=%s)",
f->f_av_desc->ad_cname.bv_val,
escaped.bv_val );
fprintf( stderr, "(%s>=%s)",
f->f_av_desc->ad_cname.bv_val,
escaped.bv_val );
fprintf( stderr, "(%s>=%s)",
f->f_av_desc->ad_cname.bv_val,
escaped.bv_val );
fprintf( stderr, "(%s<=%s)",
f->f_ava->aa_desc->ad_cname.bv_val,
escaped.bv_val );
fprintf( stderr, "(%s<=%s)",
f->f_ava->aa_desc->ad_cname.bv_val,
escaped.bv_val );
fprintf( stderr, "(%s~=%s)",
f->f_ava->aa_desc->ad_cname.bv_val,
escaped.bv_val );
fprintf( stderr, "(%s~=%s)",
f->f_ava->aa_desc->ad_cname.bv_val,
escaped.bv_val );
case LDAP_FILTER_SUBSTRINGS:
fprintf( stderr, "(%s=" /*)*/,
f->f_sub_desc->ad_cname.bv_val );
case LDAP_FILTER_SUBSTRINGS:
fprintf( stderr, "(%s=" /*)*/,
f->f_sub_desc->ad_cname.bv_val );
- if ( f->f_sub_initial != NULL ) {
- filter_escape_value( f->f_sub_initial, &escaped );
+ if ( f->f_sub_initial.bv_val != NULL ) {
+ filter_escape_value( &f->f_sub_initial, &escaped );
- for ( i = 0; f->f_sub_any[i] != NULL; i++ ) {
- filter_escape_value( f->f_sub_any[i], &escaped );
+ for ( i = 0; f->f_sub_any[i].bv_val != NULL; i++ ) {
+ filter_escape_value( &f->f_sub_any[i], &escaped );
- if ( f->f_sub_final != NULL ) {
- filter_escape_value( f->f_sub_final, &escaped );
+ if ( f->f_sub_final.bv_val != NULL ) {
+ filter_escape_value( &f->f_sub_final, &escaped );