int
get_ava(
BerElement *ber,
- AttributeAssertion **ava
+ AttributeAssertion **ava,
+ char **text
)
{
int rc;
- char *text;
struct berval type, *value;
AttributeAssertion *aa;
if( rc == LBER_ERROR ) {
Debug( LDAP_DEBUG_ANY, " get_ava ber_scanf\n", 0, 0, 0 );
+ *text = "Error decoding attribute value assertion";
return SLAPD_DISCONNECT;
}
aa = ch_malloc( sizeof( AttributeAssertion ) );
aa->aa_desc = NULL;
- rc = slap_bv2ad( &type, &aa->aa_desc, &text );
+ rc = slap_bv2ad( &type, &aa->aa_desc, text );
if( rc != LDAP_SUCCESS ) {
ch_free( type.bv_val );
int
get_ava(
BerElement *ber,
- Ava *ava
+ Ava *ava,
+ char **text
)
{
if ( ber_scanf( ber, "{ao}", &ava->ava_type, &ava->ava_value )
== LBER_ERROR ) {
Debug( LDAP_DEBUG_ANY, " get_ava ber_scanf\n", 0, 0, 0 );
+ *text = "Error decoding attribute value assertion";
return SLAPD_DISCONNECT;
}
case LDAP_FILTER_EQUALITY:
Debug( LDAP_DEBUG_FILTER, "EQUALITY\n", 0, 0, 0 );
- if ( (err = get_ava( ber, &f->f_ava )) != LDAP_SUCCESS ) {
- *text = "error decoding filter";
+ if ( (err = get_ava( ber, &f->f_ava, text )) != LDAP_SUCCESS ) {
break;
}
case LDAP_FILTER_GE:
Debug( LDAP_DEBUG_FILTER, "GE\n", 0, 0, 0 );
- if ( (err = get_ava( ber, &f->f_ava )) != LDAP_SUCCESS ) {
- *text = "decoding filter error";
+ if ( (err = get_ava( ber, &f->f_ava, text )) != LDAP_SUCCESS ) {
break;
}
case LDAP_FILTER_LE:
Debug( LDAP_DEBUG_FILTER, "LE\n", 0, 0, 0 );
- if ( (err = get_ava( ber, &f->f_ava )) != LDAP_SUCCESS ) {
- *text = "decoding filter error";
+ if ( (err = get_ava( ber, &f->f_ava, text )) != LDAP_SUCCESS ) {
break;
}
case LDAP_FILTER_APPROX:
Debug( LDAP_DEBUG_FILTER, "APPROX\n", 0, 0, 0 );
- if ( (err = get_ava( ber, &f->f_ava )) != LDAP_SUCCESS ) {
- *text = "decoding filter error";
+ if ( (err = get_ava( ber, &f->f_ava, text )) != LDAP_SUCCESS ) {
break;
}
#ifdef SLAPD_SCHEMA_NOT_COMPAT
LIBSLAPD_F (int) get_ava LDAP_P((
BerElement *ber,
- AttributeAssertion **ava ));
+ AttributeAssertion **ava,
+ char **text ));
LIBSLAPD_F (void) ava_free LDAP_P((
AttributeAssertion *ava,
int freeit ));
#else
-LIBSLAPD_F (int) get_ava LDAP_P(( BerElement *ber, Ava *ava ));
+LIBSLAPD_F (int) get_ava LDAP_P((
+ BerElement *ber,
+ Ava *ava,
+ char **text ));
LIBSLAPD_F (void) ava_free LDAP_P(( Ava *ava, int freeit ));
#endif