]> 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 09:09:58 +0000 (10:09 +0100)
src/modules/rlm_ldap/rlm_ldap.c

index b3df194f4798255df568bf0eed3ecc12d1297850..f68fb6531ed0385e270e203917d8353a88cb0dac 100644 (file)
@@ -2544,6 +2544,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);
                        }
@@ -2557,6 +2559,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);
                        }