openldap: properly UNBIND from server on shutdown
authorMarc Fournier <marc.fournier@camptocamp.com>
Fri, 16 Oct 2015 09:07:31 +0000 (11:07 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Fri, 16 Oct 2015 09:53:51 +0000 (11:53 +0200)
commit6f34350038197af824053e08638ce5f71f2bb21f
tree8f4fbd29fdf9e44cd9b3c2f020ec9cbc97bcc5ca
parent3176f0a95990d4639e55efa9b6dfffdeeeed06fb
openldap: properly UNBIND from server on shutdown

The idea is to call ldap_unbind_ext_s(), which notifies the ldap server
we're disconnecting.

We need to keep a reference to each configured databases in a global
variable so that the shutdown function can reach them in due time.

code & logic stolen from dbi.c/postgresql.c
src/openldap.c