From: Howard Chu Date: Wed, 2 Jan 2002 08:50:07 +0000 (+0000) Subject: Added 'W' fmt char for BVarrays X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~373 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=670c66bda96e924edb18d19f6563b596df82b954;p=openldap Added 'W' fmt char for BVarrays --- diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index 18d3666508..305e766a76 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -680,7 +680,8 @@ ber_scanf ( BerElement *ber, case '{': /* begin sequence */ case '[': /* begin set */ - if ( *(fmt + 1) != 'v' && *(fmt + 1) != 'V' ) + if ( *(fmt + 1) != 'v' && *(fmt + 1) != 'V' + && *(fmt + 1) != 'W' ) rc = ber_skip_tag( ber, &len ); break; diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index 08fc871e5b..c889e44ea4 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -779,6 +779,16 @@ ber_printf( BerElement *ber, LDAP_CONST char *fmt, ... ) } break; + case 'W': /* BVarray */ + if ( (bv = va_arg( ap, BVarray )) == NULL ) + break; + for ( i = 0; bv[i].bv_val != NULL; i++ ) { + if ( (rc = ber_put_berval( ber, &bv[i], + ber->ber_tag )) == -1 ) + break; + } + break; + case '{': /* begin sequence */ rc = ber_start_seq( ber, ber->ber_tag ); break;