From: Kurt Zeilenga Date: Mon, 7 Feb 2000 17:50:42 +0000 (+0000) Subject: Fix -DSLAPD_SCHEMA_NOT_COMPAT -DLDAP_DEBUG builds (still won't run) X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3195 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=79e92663e8cec286b2a1f5e4777bbcaa60549e67;p=openldap Fix -DSLAPD_SCHEMA_NOT_COMPAT -DLDAP_DEBUG builds (still won't run) --- diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index 497b6a80ff..a709bb7e62 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -462,27 +462,55 @@ filter_print( Filter *f ) switch ( f->f_choice ) { case LDAP_FILTER_EQUALITY: +#ifdef SLAPD_SCHEMA_NOT_COMPAT + fprintf( stderr, "(%s=%s)", + f->f_ava->aa_desc->ad_cname, + f->f_ava->aa_value->bv_val ); +#else fprintf( stderr, "(%s=%s)", f->f_ava.ava_type, f->f_ava.ava_value.bv_val ); +#endif break; case LDAP_FILTER_GE: +#ifdef SLAPD_SCHEMA_NOT_COMPAT + fprintf( stderr, "(%s>=%s)", + f->f_ava->aa_desc->ad_cname, + f->f_ava->aa_value->bv_val ); +#else fprintf( stderr, "(%s>=%s)", f->f_ava.ava_type, f->f_ava.ava_value.bv_val ); +#endif break; case LDAP_FILTER_LE: +#ifdef SLAPD_SCHEMA_NOT_COMPAT + fprintf( stderr, "(%s<=%s)", + f->f_ava->aa_desc->ad_cname, + f->f_ava->aa_value->bv_val ); +#else fprintf( stderr, "(%s<=%s)", f->f_ava.ava_type, f->f_ava.ava_value.bv_val ); +#endif break; case LDAP_FILTER_APPROX: +#ifdef SLAPD_SCHEMA_NOT_COMPAT + fprintf( stderr, "(%s~=%s)", + f->f_ava->aa_desc->ad_cname, + f->f_ava->aa_value->bv_val ); +#else fprintf( stderr, "(%s~=%s)", f->f_ava.ava_type, f->f_ava.ava_value.bv_val ); +#endif break; case LDAP_FILTER_SUBSTRINGS: - fprintf( stderr, "(%s=", f->f_sub_type ); +#ifdef SLAPD_SCHEMA_NOT_COMPAT + fprintf( stderr, "(%s=" /*)*/, f->f_sub_desc->ad_cname ); +#else + fprintf( stderr, "(%s=" /*)*/, f->f_sub_type ); +#endif if ( f->f_sub_initial != NULL ) { fprintf( stderr, "%s", f->f_sub_initial->bv_val ); } @@ -494,25 +522,32 @@ filter_print( Filter *f ) if ( f->f_sub_final != NULL ) { fprintf( stderr, "*%s", f->f_sub_final->bv_val ); } + fprintf( stderr, /*(*/ ")" ); break; case LDAP_FILTER_PRESENT: +#ifdef SLAPD_SCHEMA_NOT_COMPAT + fprintf( stderr, "(%s=*)", + f->f_desc->ad_cname ); +#else fprintf( stderr, "%s=*", f->f_type ); +#endif break; case LDAP_FILTER_AND: case LDAP_FILTER_OR: case LDAP_FILTER_NOT: - fprintf( stderr, "(%c", f->f_choice == LDAP_FILTER_AND ? '&' : + fprintf( stderr, "(%c" /*)*/, + f->f_choice == LDAP_FILTER_AND ? '&' : f->f_choice == LDAP_FILTER_OR ? '|' : '!' ); for ( p = f->f_list; p != NULL; p = p->f_next ) { filter_print( p ); } - fprintf( stderr, ")" ); + fprintf( stderr, /*(*/ ")" ); break; default: - fprintf( stderr, "unknown type %lu", f->f_choice ); + fprintf( stderr, "(unknown filter %lu)", f->f_choice ); break; } }