From: Kurt Zeilenga Date: Fri, 16 Jul 2004 21:26:05 +0000 (+0000) Subject: Improve error messages X-Git-Tag: OPENLDAP_REL_ENG_2_2_15~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=39b6cf783d5441e32c4ed39edc05764814952280;p=openldap Improve error messages --- diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index 89f2c96b6f..ad5ab5c82f 100644 --- a/servers/slapd/ad.c +++ b/servers/slapd/ad.c @@ -46,7 +46,7 @@ static int ad_keystring( { ber_len_t i; - if( !AD_CHAR( bv->bv_val[0] ) ) { + if( !AD_LEADCHAR( bv->bv_val[0] ) ) { return 1; } @@ -137,14 +137,14 @@ int slap_bv2ad( assert( ad != NULL ); assert( *ad == NULL ); /* temporary */ - if( bv == NULL || bv->bv_len == 0 ) { - *text = "empty attribute description"; + if( bv == NULL || BER_BVISNULL( bv ) || BER_BVISEMPTY( bv ) ) { + *text = "empty AttributeDescription"; return rtn; } /* make sure description is IA5 */ if( ad_keystring( bv ) ) { - *text = "attribute description contains inappropriate characters"; + *text = "AttributeDescription contains inappropriate characters"; return rtn; } @@ -663,13 +663,13 @@ int slap_bv2undef_ad( assert( ad != NULL ); if( bv == NULL || bv->bv_len == 0 ) { - *text = "empty attribute description"; + *text = "empty AttributeDescription"; return LDAP_UNDEFINED_TYPE; } /* make sure description is IA5 */ if( ad_keystring( bv ) ) { - *text = "attribute description contains inappropriate characters"; + *text = "AttributeDescription contains inappropriate characters"; return LDAP_UNDEFINED_TYPE; }