Improve error messages

This commit is contained in:
Kurt Zeilenga 2004-07-16 21:26:05 +00:00
parent 6084373d10
commit 39b6cf783d

View File

@ -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;
}