Sets error information in an LDAP structure. This function has been deprecated; use the ldap_set_option function.
#include <ldap.h>
int ldap_set_lderrno (
LDAP *ld,
int errnum,
char *matchedDN,
char *errmsg);
(IN) Points to the handle for the LDAP session.
(IN) Specifies the LDAP error number to set.
(IN) Points to the name of the lowest entry in the directory that was matched on the search operation. May be NULL.
(IN) Points to a text string that contains information from the LDAP server about this error. May be NULL.
Always returns LDAP_SUCCESS.
The ldap_set_lderrno function can be used to add or modify information about an error in an LDAP handle. This information can be retrieved in a subsequent call to the ldap_get_lderrno function.
The LDAP libraries make a copy of the string before storing it in the LDAP handle, so you do not need to preserve the original string after the call.
NOTE:This is not a standard IETF function. It has been added for compatibility with other LDAP vendors' libraries and should not be used in new applications. Use the ldap_set_option function with LDAP_OPT_ERR_NUMBER, LDAP_OPT_MATCHED_DN, and LDAP_OPT_ERROR_STRING.