switch ( f->f_choice ) {
case LDAP_FILTER_EQUALITY:
Debug( LDAP_DEBUG_FILTER, "EQUALITY\n", 0, 0, 0 );
-#ifdef SLAPD_SCHEMA_NOT_COMPAT
+
if ( (err = get_ava( ber, &f->f_ava )) != LDAP_SUCCESS ) {
*text = "error decoding filter";
break;
}
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
*fstr = ch_malloc( sizeof("(=)")
+ f->f_av_desc->ad_cname->bv_len
+ f->f_av_value->bv_len );
f->f_av_value->bv_val );
#else
- if ( (err = get_ava( ber, f->f_ava )) != LDAP_SUCCESS ) {
- *text = "error decoding filter";
- break;
- }
-
*fstr = ch_malloc( sizeof("(=)")
+ strlen( f->f_avtype )
+ f->f_avvalue.bv_len);
case LDAP_FILTER_GE:
Debug( LDAP_DEBUG_FILTER, "GE\n", 0, 0, 0 );
-#ifdef SLAPD_SCHEMA_NOT_COMPAT
+
if ( (err = get_ava( ber, &f->f_ava )) != LDAP_SUCCESS ) {
*text = "decoding filter error";
break;
}
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
*fstr = ch_malloc( sizeof("(>=)")
+ f->f_av_desc->ad_cname->bv_len
+ f->f_av_value->bv_len );
f->f_av_value->bv_val );
#else
- if ( (err = get_ava( ber, f->f_ava )) != LDAP_SUCCESS ) {
- *text = "decoding filter error";
- break;
- }
-
- *fstr = ch_malloc( sizeof("(>=)"
+ *fstr = ch_malloc( sizeof("(>=)")
+ strlen( f->f_avtype )
+ f->f_avvalue.bv_len);
sprintf( *fstr, "(%s>=%s)", f->f_avtype,
case LDAP_FILTER_LE:
Debug( LDAP_DEBUG_FILTER, "LE\n", 0, 0, 0 );
-#ifdef SLAPD_SCHEMA_NOT_COMPAT
+
if ( (err = get_ava( ber, &f->f_ava )) != LDAP_SUCCESS ) {
*text = "decoding filter error";
break;
}
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
+
*fstr = ch_malloc( sizeof("(<=)")
+ f->f_av_desc->ad_cname->bv_len
+ f->f_av_value->bv_len );
f->f_av_value->bv_val );
#else
- if ( (err = get_ava( ber, f->f_ava )) != LDAP_SUCCESS ) {
- *text = "error decoding filter";
- break;
- }
- *fstr = ch_malloc( sizeof("(<=)"
+ *fstr = ch_malloc( sizeof("(<=)")
+ strlen( f->f_avtype )
+ f->f_avvalue.bv_len);
sprintf( *fstr, "(%s<=%s)", f->f_avtype,
case LDAP_FILTER_APPROX:
Debug( LDAP_DEBUG_FILTER, "APPROX\n", 0, 0, 0 );
-#ifdef SLAPD_SCHEMA_NOT_COMPAT
+
if ( (err = get_ava( ber, &f->f_ava )) != LDAP_SUCCESS ) {
*text = "decoding filter error";
break;
}
+#ifdef SLAPD_SCHEMA_NOT_COMPAT
*fstr = ch_malloc( sizeof("(~=)")
+ f->f_av_desc->ad_cname->bv_len
+ f->f_av_value->bv_len );
f->f_av_value->bv_val );
#else
- if ( (err = get_ava( ber, f->f_ava )) != LDAP_SUCCESS ) {
- *text = "error decoding filter";
- break;
- }
- *fstr = ch_malloc( sizeof("(~=)"
+ *fstr = ch_malloc( sizeof("(~=)")
+ strlen( f->f_avtype )
+ f->f_avvalue.bv_len);
sprintf( *fstr, "(%s~=%s)", f->f_avtype,