ldap_unbind_ext()--Perform an LDAP Unbind Request


  Syntax
 #include <ldap.h>
 
 int ldap_unbind_ext(
                LDAP         *ld,
                LDAPControl **servctrls,
                LDAPControl **clientctrls )

  Default Public Authority: *USE

  Library Name/Service Program: QSYS/QGLDCLNT

  Threadsafe: Yes

The ldap_unbind_ext() function is used to end the connection to the LDAP server and free the resources contained in the ld structure.

Once it is called, any open connection associated with the LDAP session handle, ld, to the LDAP server is closed, and any resources associated with the handle are disposed of before returning. The ld structure is invalid and cannot be used for any further API calls. The ldap_unbind_ext() is synchronous and allows server and client controls to be included. Note that since there is no server response to an unbind there is no way to receive a response to a server control sent with an ldap_unbind_ext().


Authorities and Locks

No IBM® i authority is required.


Parameters

ld
(Input) Specifies the LDAP pointer returned by a previous call to ldap_init(), ldap_ssl_init(), or ldap_open().
serverctrls
(Input) Specifies a list of LDAP server controls. This parameter may be set to null. See Controls for LDAP APIs for more information about server controls.
clientctrls
(Input) Specifies a list of LDAP client controls. This parameter may be set to null. See Controls for LDAP APIs for more information about client controls.

Return Value

LDAP_SUCCESS
if the request was successful.

LDAP error
if the request was not successful.

Error Conditions

If ldap_unbind_ext() is not successful, it returns an LDAP error code other than LDAP_SUCCESS. See LDAP Client API Error Conditions for possible LDAP error code values.


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_unbind_ext API.


Related Information


API introduced: V5R1

[ Back to top | LDAP APIs | APIs by category ]