From: Arran Cudbard-Bell Date: Fri, 19 Oct 2018 01:44:38 +0000 (-0400) Subject: Enable dict autoloading X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf7fed1dae07dc42f61722e0b7586fc2ed02d2bc;p=thirdparty%2Ffreeradius-server.git Enable dict autoloading --- diff --git a/src/lib/server/main_config.c b/src/lib/server/main_config.c index 0ffe25ecf07..0183741ea20 100644 --- a/src/lib/server/main_config.c +++ b/src/lib/server/main_config.c @@ -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; }