]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
There's a better way to pass config sections into dl_load_func...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 28 Apr 2017 18:15:09 +0000 (14:15 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 28 Apr 2017 18:15:09 +0000 (14:15 -0400)
src/main/dl.c

index bfb6904dbb4af411f36ff0e71bb3c6a849333ffb..36860019ffb84dd7f104c9d61d0762ff55dd74b8 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 /**
- * @file dl->c
+ * @file src/main/dl.c
  * @brief Wrappers around dlopen to manage loading shared objects at runtime.
  *
  * @copyright 2016 The FreeRADIUS server project
@@ -105,16 +105,6 @@ typedef struct dl_loader {
        /** Tree of shared objects loaded
         */
        rbtree_t                *tree;
-
-       /** Configuration for module instances
-        *
-        */
-       CONF_SECTION            *mod_conf;
-
-       /** Configuration for libraries used by modules in the server.
-        *
-        */
-       CONF_SECTION            *lib_conf;
 } dl_loader_t;
 static dl_loader_t *dl;
 
@@ -193,10 +183,6 @@ static int dl_handle_cmp(void const *one, void const *two)
  */
 static int dl_load_func(dl_t const *dl_module, UNUSED void *symbol, UNUSED void *ctx)
 {
-       CONF_SECTION *cs;
-
-       cs = cf_subsection_find(dl->lib_conf, dl_module->name);
-
        if (dl_module->common->load && (dl_module->common->load() < 0)) {
                ERROR("Initialisation failed for module \"%s\"", dl_module->common->name);
                return -1;
@@ -775,13 +761,6 @@ static int dl_init(CONF_SECTION *root)
        if (dl) return 0;
 
        dl = talloc_zero(NULL, dl_loader_t);
-
-       /*
-        *      Cache this for use in the load callback
-        */
-       dl->lib_conf = cf_section_find_next(root, NULL, "library");
-       dl->mod_conf = cf_section_find_next(root, NULL, "modules");
-
        dl->tree = rbtree_create(dl, dl_handle_cmp, NULL, 0);
        if (!dl->tree) {
                ERROR("Failed initialising dl->tree");