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

Re: Detecting an error from ldap_get_values()

"Kurt D. Zeilenga" wrote:
> I found a number of routines which need to be fixed in this
> regard includings references.c, request.c, and result.c.

Before we get too carried away with fixing things, I find
clearing the lderrno on every ldap_{first,next}_thing call a
terrible verbosity.

Actually, using the API would be *much* easier if we could just
carry away until getting NULL and then checking if an error
happened.  The WG might conclude the same.  See:

	int success = LDAP_SUCCESS;

	for (ldap_set_option(ld, &success),
		entry = ldap_first_entry(ld, _res);
	     entry != NULL;
	     ldap_set_option(ld, &success),
		entry = ldap_next_entry(ld, res)) {