ber_bvnone = BER_BVC( "(?=none)" );
ber_len_t len;
void *memctx = dc->memctx;
+ ber_tag_t choice;
assert( fstr != NULL );
BER_BVZERO( fstr );
return LDAP_OTHER;
}
- switch ( ( f->f_choice & SLAPD_FILTER_MASK ) ) {
+ choice = f->f_choice & SLAPD_FILTER_MASK;
+ switch ( choice ) {
case LDAP_FILTER_EQUALITY:
if ( f->f_av_desc->ad_type->sat_syntax == slap_schema.si_syn_distinguishedName ) {
asyncmeta_dn_massage( dc, &f->f_av_value, &vtmp );
fstr->bv_val = dc->op->o_tmpalloc( fstr->bv_len + 128, memctx ); /* FIXME: why 128? */
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%c)",
- f->f_choice == LDAP_FILTER_AND ? '&' :
- f->f_choice == LDAP_FILTER_OR ? '|' : '!' );
+ choice == LDAP_FILTER_AND ? '&' :
+ choice == LDAP_FILTER_OR ? '|' : '!' );
for ( p = f->f_list; p != NULL; p = p->f_next ) {
int rc;
goto out;
}
- switch ( f->f_choice ) {
+ switch ( f->f_choice & SLAPD_FILTER_MASK ) {
case SLAPD_FILTER_COMPUTED:
switch( f->f_result ) {
case SLAPD_COMPARE_UNDEFINED:
ber_bvunknown = BER_BVC( "(?=unknown)" ),
ber_bvnone = BER_BVC( "(?=none)" );
ber_len_t len;
+ ber_tag_t choice;
assert( fstr != NULL );
BER_BVZERO( fstr );
return LDAP_OTHER;
}
- switch ( ( f->f_choice & SLAPD_FILTER_MASK ) ) {
+ choice = f->f_choice & SLAPD_FILTER_MASK;
+ switch ( choice ) {
case LDAP_FILTER_EQUALITY:
if ( map_attr_value( dc, f->f_av_desc, &atmp,
&f->f_av_value, &vtmp, remap, memctx ) )
fstr->bv_val = ber_memalloc_x( fstr->bv_len + 128, memctx ); /* FIXME: why 128? */
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%c)",
- f->f_choice == LDAP_FILTER_AND ? '&' :
- f->f_choice == LDAP_FILTER_OR ? '|' : '!' );
+ choice == LDAP_FILTER_AND ? '&' :
+ choice == LDAP_FILTER_OR ? '|' : '!' );
for ( p = f->f_list; p != NULL; p = p->f_next ) {
int rc;
unsigned i;
int done = 0;
int rc = 0;
+ ber_tag_t choice;
Debug( LDAP_DEBUG_TRACE, "==>backsql_process_filter()\n" );
- if ( f->f_choice == SLAPD_FILTER_COMPUTED ) {
+ choice = f->f_choice & SLAPD_FILTER_MASK;
+ if ( choice == SLAPD_FILTER_COMPUTED ) {
struct berval flt;
char *msg = NULL;
goto done;
}
- switch( f->f_choice ) {
+ switch( choice ) {
case LDAP_FILTER_OR:
rc = backsql_process_filter_list( bsi, f->f_or,
LDAP_FILTER_OR );
* otherwise, let's see if we are lucky: filtering
* for "structural" objectclass or ancestor...
*/
- switch ( f->f_choice ) {
+ switch ( choice ) {
case LDAP_FILTER_EQUALITY:
{
ObjectClass *oc = oc_bvfind( &f->f_av_value );
char keyvalbuf[LDAP_PVT_INTTYPE_CHARS(unsigned long)];
#endif /* ! BACKSQL_ARBITRARY_KEY */
- switch ( f->f_choice ) {
+ switch ( choice ) {
case LDAP_FILTER_EQUALITY:
backsql_entryUUID_decode( &f->f_av_value, &oc_id, &keyval );
return 1;
}
- switch ( f->f_choice ) {
+ switch ( f->f_choice & SLAPD_FILTER_MASK ) {
case LDAP_FILTER_EQUALITY:
filter_value = &f->f_av_value;
matching_rule = at->bam_ad->ad_type->sat_equality;
goto done;
}
- switch ( f->f_choice ) {
+ switch ( f->f_choice & SLAPD_FILTER_MASK ) {
case SLAPD_FILTER_COMPUTED:
switch( f->f_result ) {
case SLAPD_COMPARE_UNDEFINED:
ber_bvunknown = BER_BVC( "(?=unknown)" ),
ber_bvnone = BER_BVC( "(?=none)" );
ber_len_t len;
+ ber_tag_t choice;
assert( fstr != NULL );
BER_BVZERO( fstr );
}
#endif
- switch ( f->f_choice & SLAPD_FILTER_MASK ) {
+ choice = f->f_choice & SLAPD_FILTER_MASK;
+ switch ( choice ) {
case LDAP_FILTER_EQUALITY:
ad = f->f_av_desc;
if ( map_attr_value( dc, &ad, &atmp,
fstr->bv_val = op->o_tmpalloc( fstr->bv_len + 128, op->o_tmpmemctx );
snprintf( fstr->bv_val, fstr->bv_len + 1, "(%c)",
- f->f_choice == LDAP_FILTER_AND ? '&' :
- f->f_choice == LDAP_FILTER_OR ? '|' : '!' );
+ choice == LDAP_FILTER_AND ? '&' :
+ choice == LDAP_FILTER_OR ? '|' : '!' );
for ( p = f->f_list; p != NULL; p = p->f_next ) {
int rc;