Commit 670c66bd authored by Howard Chu's avatar Howard Chu
Browse files

Added 'W' fmt char for BVarrays

parent 61128d00
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment