Returns error information about the last LDAP operation. This function has been deprecated; use the ldap_get_option function.
#include <ldap.h>
int ldap_get_lderrno (
LDAP *ld,
char **matchedDN,
char **errmsg);
(IN) Points to the handle for the LDAP session.
(OUT) Points to the name of the lowest entry in the directory that was matched on the operation.
(OUT) Points to a text string that is optionally returned by the server. This string includes additional details about the error and is not the standard string associated with the error code. Applications should not depend on format of this parameter or assume that it contains data.
Returns the LDAP error code from the last operation. Use the ldap_err2string function to get the text string associated with this error code.
The pointers returned in the function point directly into the LDAP structure.
NOTE:The application should not free these pointers. The pointers must not be used after another LDAP operation has been called. The pointers should not be used to modify the data.
The application should examine or copy the strings before calling another LDAP function.
The pointers are set after every LDAP operation which returns or parses an LDAP result message.
If information is not needed for either the matchedDN or the errmsg parameter, the parameter can be set to NULL.
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_get_option function with LDAP_OPT_ERR_NUMBER, LDAP_OPT_MATCHED_DN, and LDAP_OPT_ERROR_STRING.