[Date Prev][Date Next] [Chronological] [Thread] [Top]

ber_scanf and ber_printf strangeness



Hi!

I'm developing kldap, a Qt wrapper for LDAP-functions. When I tested ber_scanf 
and ber_printf functions, I found this strangeness:
Encode a sequence of octet strings via ber_printf
ber_printf(ber,"{v}",list_of_strings);
But decoding only succeeds if I use the following scanf formats:
ber_scanf(ber,"v",...) - yes, without '{}', or
ber_scanf(ber,"{ooo}") 
As I read the ber_scanf man page, 'v' format actually decodes a sequence of 
octet strings, so my examples are correct according to these. But the code 
example on the end shows that '{v}' should be used. So what is the right way?

Regards,
György