diff options
| -rw-r--r-- | src/tinyrad.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/tinyrad.c b/src/tinyrad.c index e5b740d..b7f3459 100644 --- a/src/tinyrad.c +++ b/src/tinyrad.c | |||
| @@ -198,7 +198,6 @@ int main(int argc, char * argv[]) | |||
| 198 | int opt_index; | 198 | int opt_index; |
| 199 | int rc; | 199 | int rc; |
| 200 | TinyRadDict * dict; | 200 | TinyRadDict * dict; |
| 201 | TinyRad * tr; | ||
| 202 | TinyRadConf cnfdata; | 201 | TinyRadConf cnfdata; |
| 203 | TinyRadConf * cnf; | 202 | TinyRadConf * cnf; |
| 204 | 203 | ||
| @@ -310,7 +309,7 @@ int main(int argc, char * argv[]) | |||
| 310 | }; | 309 | }; |
| 311 | 310 | ||
| 312 | // load TinyRad handle | 311 | // load TinyRad handle |
| 313 | rc = tinyrad_load_dict(cnf->opts, cnf->tr_opts, &tr, cnf->url, cnf->dict_files, cnf->dict_paths); | 312 | rc = tinyrad_load_dict(cnf->opts, cnf->tr_opts, &cnf->tr, cnf->url, cnf->dict_files, cnf->dict_paths); |
| 314 | if (rc != TRAD_SUCCESS) | 313 | if (rc != TRAD_SUCCESS) |
| 315 | { | 314 | { |
| 316 | tinyrad_cleanup(cnf); | 315 | tinyrad_cleanup(cnf); |
| @@ -320,7 +319,7 @@ int main(int argc, char * argv[]) | |||
| 320 | // display dictionary | 319 | // display dictionary |
| 321 | if ((cnf->opts & MY_OPT_DICT_DUMP)) | 320 | if ((cnf->opts & MY_OPT_DICT_DUMP)) |
| 322 | { | 321 | { |
| 323 | tinyrad_get_option(tr, TRAD_OPT_DICTIONARY, &dict); | 322 | tinyrad_get_option(cnf->tr, TRAD_OPT_DICTIONARY, &dict); |
| 324 | tinyrad_dict_print(dict, 0xffff); | 323 | tinyrad_dict_print(dict, 0xffff); |
| 325 | tinyrad_cleanup(cnf); | 324 | tinyrad_cleanup(cnf); |
| 326 | tinyrad_free(dict); | 325 | tinyrad_free(dict); |
| @@ -330,8 +329,8 @@ int main(int argc, char * argv[]) | |||
| 330 | // display configuration | 329 | // display configuration |
| 331 | if ((cnf->opts & MY_OPT_CONFIG_PRINT)) | 330 | if ((cnf->opts & MY_OPT_CONFIG_PRINT)) |
| 332 | { | 331 | { |
| 333 | tinyrad_get_option(tr, TRAD_OPT_DICTIONARY, &dict); | 332 | tinyrad_get_option(cnf->tr, TRAD_OPT_DICTIONARY, &dict); |
| 334 | tinyrad_conf_print(tr, dict); | 333 | tinyrad_conf_print(cnf->tr, dict); |
| 335 | tinyrad_cleanup(cnf); | 334 | tinyrad_cleanup(cnf); |
| 336 | tinyrad_free(dict); | 335 | tinyrad_free(dict); |
| 337 | return(0); | 336 | return(0); |
