From: Alan T. DeKok Date: Tue, 5 Mar 2019 00:59:09 +0000 (-0500) Subject: load using the new dictionary layout X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6c7fb3fd46b5434bc3f39bffe5d8a185417edeb;p=thirdparty%2Ffreeradius-server.git load using the new dictionary layout --- diff --git a/src/bin/radict.c b/src/bin/radict.c index a89a8048dc1..caae4202eda 100644 --- a/src/bin/radict.c +++ b/src/bin/radict.c @@ -106,13 +106,18 @@ static int load_dicts(TALLOC_CTX *ctx, char const *dict_dir) fr_strerror_printf("Reached maximum number of dictionaries"); goto error; } - INFO("Loading dictionary: %s/%s", dict_dir, dp->d_name); - if (fr_dict_protocol_afrom_file(dict_end++, dp->d_name) < 0) goto error; - /* - * ...otherwise recurse to process sub-protocols (maybe?) - */ - } else { - if (load_dicts(ctx, file_str) < 0) goto error; + + INFO("Loading dictionary: %s/dictionary", file_str); + if (fr_dict_read(*dict_end, file_str, "dictionary") < 0) { + goto error; + } + dict_end++; + + /* + * ...otherwise recurse to process sub-protocols (maybe?) + */ + } else if (load_dicts(ctx, file_str) < 0) { + goto error; } } talloc_free(file_str); @@ -237,7 +242,7 @@ int main(int argc, char *argv[]) INFO("Loading dictionary: %s/%s", dict_dir, FR_DICTIONARY_FILE); - if (fr_dict_internal_afrom_file(dict_end++, NULL) < 0) { + if (fr_dict_internal_afrom_file(dict_end++, FR_DICTIONARY_INTERNAL_DIR) < 0) { fr_perror("radict"); ret = 1; goto finish;