diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2013-01-07 20:01:26 +0100 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-01-25 00:11:54 +0400 |
commit | e7d09a09b377e0b778958d156a3047337aefc6f8 (patch) | |
tree | d0ad827b3cd853226a70b7a22806af01b081a66e /accel-pppd/ctrl/l2tp | |
parent | c82eec497ff2e5338c9e811765ca28e4105fb515 (diff) | |
download | accel-ppp-xebd-e7d09a09b377e0b778958d156a3047337aefc6f8.tar.gz accel-ppp-xebd-e7d09a09b377e0b778958d156a3047337aefc6f8.zip |
Fix boolean options parsing in configuration file
Explicitely interpret zero values when parsing boolean options. This
allows to unset boolean parameters such as "verbose" when reloading
the configuration.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/ctrl/l2tp')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index dd8b81b..1588797 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -1612,12 +1612,12 @@ static void load_config(void) const char *opt; opt = conf_get_opt("l2tp", "verbose"); - if (opt && atoi(opt) > 0) - conf_verbose = 1; + if (opt && atoi(opt) >= 0) + conf_verbose = atoi(opt) > 0; opt = conf_get_opt("l2tp", "avp_permissive"); - if (opt && atoi(opt) > 0) - conf_avp_permissive = 1; + if (opt && atoi(opt) >= 0) + conf_avp_permissive = atoi(opt) > 0; opt = conf_get_opt("l2tp", "hello-interval"); if (opt && atoi(opt) > 0) |