]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't close connections that are in use.
authorAlan T. DeKok <aland@freeradius.org>
Tue, 21 Feb 2012 08:08:27 +0000 (09:08 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 21 Feb 2012 08:08:27 +0000 (09:08 +0100)
src/modules/rlm_ldap/rlm_ldap.c

index e91f02e1bfe15c0ba01100b95d110b9c34c43885..a6f791f2cf565dcc8c07212fce1d3aeb79a0760b 100644 (file)
@@ -2584,6 +2584,8 @@ ldap_detach(void *instance)
                int i;
 
                for (i = 0;i < inst->num_conns; i++) {
+                       if (inst->conns[i].locked) return -1;
+
                        if (inst->conns[i].ld){
                                ldap_unbind_s(inst->conns[i].ld);
                        }
@@ -2597,6 +2599,8 @@ ldap_detach(void *instance)
                int i;
 
                for (i = 0; i < inst->num_conns; i++) {
+                       if (inst->apc_conns[i].locked) return -1;
+
                        if (inst->apc_conns[i].ld){
                                ldap_unbind_s(inst->apc_conns[i].ld);
                        }