diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-07-16 09:48:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:28:38 -0500 |
commit | 2fc53c947b6c18f5e9761a26792f806ff588e239 (patch) | |
tree | 0fa27ae414cb7e354f3e64542b00436568efc08a /source3/libads/ldap.c | |
parent | 476c30b9ce38eec8985447fdcd1d3ece97370704 (diff) | |
download | samba-2fc53c947b6c18f5e9761a26792f806ff588e239.tar.gz samba-2fc53c947b6c18f5e9761a26792f806ff588e239.tar.bz2 samba-2fc53c947b6c18f5e9761a26792f806ff588e239.zip |
r23886: add ads_disconnect() function
metze
(This used to be commit ba70737b7043cae89dd90f8668a24881212ac6fb)
Diffstat (limited to 'source3/libads/ldap.c')
-rw-r--r-- | source3/libads/ldap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 84ceba2406..c5c43c44c5 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -465,6 +465,18 @@ got_connection: return ads_sasl_bind(ads); } +/** + * Disconnect the LDAP server + * @param ads Pointer to an existing ADS_STRUCT + **/ +void ads_disconnect(ADS_STRUCT *ads) +{ + if (ads->ld) { + ldap_unbind(ads->ld); + ads->ld = NULL; + } +} + /* Duplicate a struct berval into talloc'ed memory */ |