From 2afdce833429f77a68071deada56609091418784 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 9 Jul 2004 00:14:15 +0000 Subject: [PATCH] cleanup AD stuff (ITS#3225) --- servers/slapd/ad.c | 6 +++--- servers/slapd/slap.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/servers/slapd/ad.c b/servers/slapd/ad.c index 19a8ca0c55..0dacb6eb9d 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; } @@ -138,13 +138,13 @@ int slap_bv2ad( assert( *ad == NULL ); /* temporary */ if( bv == NULL || BER_BVISNULL( bv ) || BER_BVISEMPTY( bv ) ) { - *text = "empty attribute description"; + *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; } diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index f1853ee04f..1951cd983e 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -148,9 +148,9 @@ LDAP_BEGIN_DECL #define OID_CHAR(c) ( OID_LEADCHAR(c) || OID_SEPARATOR(c) ) #define ATTR_LEADCHAR(c) ( DESC_LEADCHAR(c) || OID_LEADCHAR(c) ) -#define ATTR_CHAR(c) ( DESC_CHAR((c)) || (c) == '.' ) +#define ATTR_CHAR(c) ( DESC_CHAR((c)) || OID_SEPARATOR(c) ) -#define AD_LEADCHAR(c) ( ATTR_CHAR(c) ) +#define AD_LEADCHAR(c) ( ATTR_LEADCHAR(c) ) #define AD_CHAR(c) ( ATTR_CHAR(c) || (c) == ';' ) #define SLAP_NUMERIC(c) ( ASCII_DIGIT(c) || ASCII_SPACE(c) ) -- 2.39.5