Oscar Figueiredo <Oscar.Figueiredo(a)di.epfl.ch> writes:
>>>>> "William" == William M Perry
<wmperry(a)aventail.com> writes:
William> Michael Harnois <mharnois(a)willinet.net> writes:
>> On 07 Jun 1999 07:38:04 -0500, wmperry(a)aventail.com (William M.
Perry) said:
>>
>> > ("LDAP error",
>> > build_string (ldap_err2string (ldap_get_lderrno (ld, NULL,
NULL))));
>>
>> If I read my files correctly the function that is here called
>> ldap_get_lderrno is in OpenLDAP 2 called ldap_result2error. I also
>> noticed in other examples in the OpenLDAP source which used the
function
>> that the third argument is 0 rather than NULL.
William> well, ldap_result2error only gets you some of the cases where
an error
William> occurs. What happens if you want to see why ldap_init()
failed?
Bill, it seems we've been working on the same thing at the same time, we
probably should synchronize a little better in order to avoid wasting our
efforts.
In the case ldap_init() fails errno should be checked. This is what we
do already for ldap_open().
My patch is a little more extensive than yours and handles the errors in
compliance with the current IETF draft-ietf-ldapext-ldap-c-api-02.
Furthermore if I read it well, yours should fail if you use libraries
without liblber.
Are there any such?
However, from you patch I saw things that would need to be changed
in
mine:
- remove the check for libldap10 as you appropriately mentioned
- use AC_CHECK_FUNCS instead of individual AC_CHECK_FUNCs
- probably test and use ldap_init() instead of ldap_open() since the
draft
deprecates this function (I'd rather wait for an RFC here however)
What I propose is for the CVS maintainers to hold on until I come up with
something that fixes all this. Probably still today.
Sounds good to me.
-bp