[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
[newbie] How to make consecutive calls to ber_scanf work?
- To: <openldap-software@OpenLDAP.org>
- Subject: [newbie] How to make consecutive calls to ber_scanf work?
- From: "Ames Andreas" <Andreas.Ames@comergo.com>
- Date: Fri, 11 Feb 2005 15:23:56 +0100
- Content-class: urn:content-classes:message
- Thread-index: AcUQRVG7ykAWXdbkTtm3qvXL+lzVBQ==
- Thread-topic: [newbie] How to make consecutive calls to ber_scanf work?
Hello,
subject says pretty much it. The value that the BerElement contains
(a simple-paged-result control) just contains an integer and an octet
string. I want all calls to ber_scanf read these same two values. In
the following cases I get LBER_ERROR for the last call to ber_scanf
1) ber_scanf(ber, "{iO", &size, &cookiep);
ber_scanf(ber, "{iO", &size, &cookiep);
2) ber_printf(ber, "{iON}", &size, &cookie);
ber_scanf(ber, "{iO", &size, &cookiep);
I've fooled around with different "ber_reset(ber, 0|1)" invocations
but couldn't get it straight. For the first case above, I could
imagine that "ber_dup" could be useful, but I'd prefer doing without
additional memory allocations.
Please advice me.
TIA,
aa
--
Andreas Ames | Programmer | Comergo GmbH |
Voice: +49 69 7505 3213 | andreas . ames AT comergo . com