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

Re: library routines idempotent?



Paul Jarc writes:
> Is it ok to call ldap_{first,next}_entry, ldap_{first,next}_attribute,
> ldap_get_values, etc., multiple times on the same inputs?

Yes.

> Are the results guaranteed to be the same each time (not necessarily
> returning the same alloocated object, but at least *an* object
> containing the same value)?

Yes, unless an error happens.  E.g. a malloc error.
However, the spec (draft-ietf-ldapext-ldap-c-api-05.txt) does not
guarantee that the results will be in the same _order_.  As far as I can
tell, OpenLDAP does give the same order, though.

-- 
Hallvard