ldap_unbind() function unbinds from the directory, terminates the current association, and frees the resources contained in the LDAP structure. The ldap_unbind() routine works just like ldap_unbind_s(); both routines are synchronous.
For additional information, see "Closing the Connection to the Server" on page 66.
#include <ldap.h>
int ldap_unbind( LDAP *ld );
ld |
Connection handle, which is a pointer to an |
ldap_unbind_s() function.
#include <ldap.h>
...
LDAP *ld;
...
/* After completing your LDAP operations with the server, close the connection. */
if ( ldap_unbind( ld ) != LDAP_SUCCESS ) {ldap_perror( ld, "Error while unbinding from the directory" );
return( 1 );
}
...
ldap_unbind_s().
Last Updated: 10/01/98 17:06:23