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

[newbie] How to make consecutive calls to ber_scanf work?


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.



Andreas Ames | Programmer | Comergo GmbH | 
Voice:  +49 69 7505 3213 | andreas . ames AT comergo . com