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

Re: library questions: LDAPMessage, msgid, ...

Paul Jarc writes:
>I wrote:
>>   ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &errcode);
> That reminds me: what is LDAP_OPT_ERROR_STRING for?  Does it just give
> the same information that is available through ldap_err2string?

No.  ldap_err2string() converts a result code to a string.
LDAP_OPT_ERROR_STRING (and LDAP_OPT_MATCHED_DN) return error information
from the last LDAP operation which was provided by the server in
addition to the result code.  For example, an attempt to modify schema
information in OpenLDAP gets the result code LDAP_UNWILLING_TO_PERFORM
and the error string "modification of subschema subentry not supported".