diff options
| author | David M. Syzdek <david@syzdek.net> | 2022-03-21 17:10:20 -0800 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2022-03-21 17:10:20 -0800 |
| commit | 519d6acb907ec336a335a1f3e6a6375d0989338c (patch) | |
| tree | a2dae9bd0d7305950d842d24896105832d04f724 /lib | |
| parent | 9b121ac981bc483868fb3628ef256a78ab203557 (diff) | |
| download | tinyrad-519d6acb907ec336a335a1f3e6a6375d0989338c.tar.gz tinyrad-519d6acb907ec336a335a1f3e6a6375d0989338c.tar.bz2 tinyrad-519d6acb907ec336a335a1f3e6a6375d0989338c.tar.xz tinyrad-519d6acb907ec336a335a1f3e6a6375d0989338c.zip | |
libtinyrad: adding TRAD_STOPINIT
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libtinyrad/lconf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libtinyrad/lconf.c b/lib/libtinyrad/lconf.c index ad04db7..ef0c884 100644 --- a/lib/libtinyrad/lconf.c +++ b/lib/libtinyrad/lconf.c | |||
| @@ -308,6 +308,9 @@ tinyrad_conf_opt( | |||
| 308 | assert(name != NULL); | 308 | assert(name != NULL); |
| 309 | assert(value != NULL); | 309 | assert(value != NULL); |
| 310 | 310 | ||
| 311 | tr = ( ((tr)) && (!(tr->opts & TRAD_STOPINIT)) ) ? tr : NULL; | ||
| 312 | dict = ( ((dict)) && (!(dict->opts & TRAD_STOPINIT)) ) ? dict : NULL; | ||
| 313 | |||
| 311 | if (!(strcasecmp(name, "bind_address"))) | 314 | if (!(strcasecmp(name, "bind_address"))) |
| 312 | { | 315 | { |
| 313 | if ( (!(tr)) || ((tr->bind_sa)) || ((tr->bind_sa6)) || (!(value)) ) | 316 | if ( (!(tr)) || ((tr->bind_sa)) || ((tr->bind_sa6)) || (!(value)) ) |
| @@ -373,6 +376,12 @@ tinyrad_conf_opt( | |||
| 373 | return(tinyrad_set_option(tr, TRAD_OPT_SECRET, value)); | 376 | return(tinyrad_set_option(tr, TRAD_OPT_SECRET, value)); |
| 374 | }; | 377 | }; |
| 375 | 378 | ||
| 379 | if (!(strcasecmp(name, "stopinit"))) | ||
| 380 | { | ||
| 381 | tinyrad_conf_opt_bool(tr, dict, TRAD_STOPINIT, value); | ||
| 382 | return(TRAD_SUCCESS); | ||
| 383 | }; | ||
| 384 | |||
| 376 | if (!(strcasecmp(name, "timeout"))) | 385 | if (!(strcasecmp(name, "timeout"))) |
| 377 | { | 386 | { |
| 378 | if ( (!(tr)) || (tr->timeout != -1) || (!(value)) ) | 387 | if ( (!(tr)) || (tr->timeout != -1) || (!(value)) ) |
