]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Enable dict autoloading
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 19 Oct 2018 01:44:38 +0000 (21:44 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 10 Dec 2018 16:20:30 +0000 (11:20 -0500)
src/lib/server/main_config.c

index 0ffe25ecf0738e6fbc49c3df227a5d2b7a8fcb6f..0183741ea20db9fad6e49b3e193c951ed6315a27 100644 (file)
@@ -437,33 +437,10 @@ static int _module_dict_autoload(dl_t const *module, void *symbol, UNUSED void *
 {
        DEBUG("Loading dictionary %s", module->name);
 
-#if 0
        if (fr_dict_autoload((fr_dict_autoload_t const *)symbol) < 0) {
                WARN("Failed initialising protocol library: %s", fr_strerror());
-               return 0;
-       }
-#else
-       /*
-        *      Hack for now
-        */
-       fr_dict_autoload_t const        *to_load, *p;
-       char                            buffer[256];
-
-       to_load = symbol;
-
-       for (p = to_load; p->out; p++) {
-               snprintf(buffer, sizeof(buffer), "dictionary.%s", p->proto);
-
-               /*
-                *      0   == loaded
-                *      -1  == error on load
-                *      -2  == non-existent
-                */
-               if (fr_dict_read(main_config->dict, main_config->dict_dir, buffer) == -1) return -1;
-
-               if (p->out) *(p->out) = main_config->dict;
+               return -1;
        }
-#endif
 
        return 0;
 }