ldap_result2error()--Retrieve LDAP Error Information
Syntax
#include <ldap.h>
int ldap_result2error(
LDAP *ld,
LDAPMessage *res,
int freeit)
Default Public Authority: *USE
Library Name/Service Program: QSYS/QGLDCLNT
Threadsafe: Yes
The ldap_result2error() API takes a result as produced by
ldap_result() or
ldap_search_s(), and returns the corresponding error code.
Authorities and Locks
No i5/OS authority is required.
Parameters
- ld
- (Input) Specifies the LDAP pointer returned by a previous call to ldap_init(),
ldap_ssl_init(), or ldap_open().
- res
- (Input/Output) Specifies the result, as produced by ldap_result(), to be converted to the error code with
which it is associated.
- freeit
- (Input) Specifies whether or not the result, res, should be freed
as a result of calling ldap_result2error(). If non-zero, the
result, res, will be freed by the call. If zero, res will not
be freed by the call.
Return Value
- LDAP error code
- The result of the ldap request in res.
Error Conditions
The ldap_result2error() function will return an LDAP error
code. See LDAP Client API Error Conditions
for possible LDAP error codes.
Error Messages
The following message may be sent from this function.
Message ID |
Error Message Text |
CPF3CF2 E |
Error(s) occurred during running of
ldap_result2error API. |
Related Information
API introduced: V4R3