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

Re: ber_scanf and ber_printf strangeness



Szombathelyi György wrote:
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?

It looks like the manpage example is wrong.

--
  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP     http://www.openldap.org/project/