]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
move "free clients" to mod_close(), instead of mod_detach()
authorAlan T. DeKok <aland@freeradius.org>
Fri, 21 Sep 2018 14:43:08 +0000 (10:43 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 21 Sep 2018 14:43:08 +0000 (10:43 -0400)
since the dl framework calls mod_detach, we don't have to do that
for child listeners.

src/lib/io/master.c

index 94452955623e7f46d0422ea41c4f425cd7757047..650375699211dc531e98a9b3e360938c1cc1d899 100644 (file)
@@ -2297,6 +2297,7 @@ static int mod_close(fr_listen_t *li)
        fr_io_instance_t *inst;
        fr_io_connection_t *connection;
        fr_listen_t *child;
+       fr_io_client_t *client;
 
        get_inst(li->app_io_instance, &inst, &connection, &child);
 
@@ -2322,23 +2323,6 @@ static int mod_close(fr_listen_t *li)
                talloc_free(connection->dl_inst);
        }
 
-       return 0;
-}
-
-
-static int mod_detach(void *instance)
-{
-       fr_io_instance_t *inst;
-       fr_io_connection_t *connection;
-       fr_listen_t *child;
-       int rcode;
-       fr_io_client_t *client;
-
-       get_inst(instance, &inst, &connection, &child);
-
-       rcode = inst->app_io->detach(child->app_io_instance);
-       if (rcode < 0) return rcode;
-
        /*
         *      Each client is it's own talloc context, so we have to
         *      clean them up individually.
@@ -2676,7 +2660,6 @@ fr_app_io_t fr_master_app_io = {
        .magic                  = RLM_MODULE_INIT,
        .name                   = "radius_master_io",
 
-       .detach                 = mod_detach,
        .bootstrap              = mod_bootstrap,
        .instantiate            = mod_instantiate,