aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2022-03-21 22:17:31 -0800
committerDavid M. Syzdek <david@syzdek.net>2022-03-21 22:17:31 -0800
commit2a88719cd1b45d4e74f9c225f315ef46799de18e (patch)
tree25f7f70ad8df144252037ada1c6b359a1fbf98b8 /src
parente803045b5508a43e43df7d28cbdab2c26d56a058 (diff)
downloadtinyrad-2a88719cd1b45d4e74f9c225f315ef46799de18e.tar.gz
tinyrad-2a88719cd1b45d4e74f9c225f315ef46799de18e.tar.bz2
tinyrad-2a88719cd1b45d4e74f9c225f315ef46799de18e.tar.xz
tinyrad-2a88719cd1b45d4e74f9c225f315ef46799de18e.zip
tinyrad: removing call to my_dict_load() if dictionary files not specified
Diffstat (limited to 'src')
-rw-r--r--src/tinyrad.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/tinyrad.c b/src/tinyrad.c
index e12afdf..906d4ad 100644
--- a/src/tinyrad.c
+++ b/src/tinyrad.c
@@ -241,11 +241,14 @@ int main(int argc, char * argv[])
241 }; 241 };
242 242
243 // load RADIUS dictionary 243 // load RADIUS dictionary
244 if ((rc = my_dict_load(opts, tr_opts, &dict, dict_files, dict_paths)) != TRAD_SUCCESS) 244 if ((dict_files))
245 { 245 {
246 tinyrad_strsfree(dict_files); 246 if ((rc = my_dict_load(opts, tr_opts, &dict, dict_files, dict_paths)) != TRAD_SUCCESS)
247 tinyrad_strsfree(dict_paths); 247 {
248 return(trutils_exit_code(rc)); 248 tinyrad_strsfree(dict_files);
249 tinyrad_strsfree(dict_paths);
250 return(trutils_exit_code(rc));
251 };
249 }; 252 };
250 tinyrad_strsfree(dict_paths); 253 tinyrad_strsfree(dict_paths);
251 tinyrad_strsfree(dict_files); 254 tinyrad_strsfree(dict_files);
@@ -301,18 +304,6 @@ my_dict_load(
301 return(rc); 304 return(rc);
302 }; 305 };
303 306
304 // load defaults
305 if ((opts & MY_OPT_DICT_DEFAULTS))
306 {
307 if ((rc = tinyrad_dict_builtin(dict, &errs)) != TRAD_SUCCESS)
308 {
309 trutils_error(opts, errs, NULL);
310 tinyrad_strsfree(errs);
311 tinyrad_free(dict);
312 return(rc);
313 };
314 };
315
316 // set paths 307 // set paths
317 for(pos = 0; ( ((dict_paths)) && ((dict_paths[pos])) ); pos++) 308 for(pos = 0; ( ((dict_paths)) && ((dict_paths[pos])) ); pos++)
318 { 309 {