mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Added 'W' fmt char for BVarrays
This commit is contained in:
parent
61128d0020
commit
670c66bda9
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user