From: Kurt Zeilenga Date: Thu, 27 Jan 2000 01:02:51 +0000 (+0000) Subject: Add IA5StringConvert (to UCS-2/4). May not be needed if we use X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3241 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4ec79023bd588c60ab3975b17505d61d9930a8ab;p=openldap Add IA5StringConvert (to UCS-2/4). May not be needed if we use UTF-8 internally. --- diff --git a/servers/slapd/schema.c b/servers/slapd/schema.c index da518d5ca1..9913f12880 100644 --- a/servers/slapd/schema.c +++ b/servers/slapd/schema.c @@ -922,6 +922,25 @@ IA5StringValidate( return 0; } +static int +IA5StringConvert( + Syntax *syntax, + struct berval *in, + struct berval **out ) +{ + struct berval *bv = ch_malloc( sizeof(struct berval) ); + bv->bv_len = (in->bv_len+1) * sizeof( ldap_unicode_t ); + bv->bv_val = ch_malloc( bv->bv_len ); + + for(i=0; i < val->bv_len; i++ ) { + /* + * IA5StringValidate should have been called to ensure + * input is limited to IA5. + */ + bv->bv_val[i] = in->bv_val[i]; + } +} + static int IA5StringNormalize( Syntax *syntax,