From 3a68b66387b2e352d4ffe60c0dd4aeeb2c599fb4 Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Mon, 7 Jan 2013 20:01:26 +0100 Subject: 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 --- accel-pppd/shaper/shaper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'accel-pppd/shaper') diff --git a/accel-pppd/shaper/shaper.c b/accel-pppd/shaper/shaper.c index 8ae2630a..3628bc5a 100644 --- a/accel-pppd/shaper/shaper.c +++ b/accel-pppd/shaper/shaper.c @@ -908,9 +908,9 @@ static void load_config(void) opt = conf_get_opt("shaper", "verbose"); - if (opt && atoi(opt) > 0) - conf_verbose = 1; - + if (opt && atoi(opt) >= 0) + conf_verbose = atoi(opt) > 0; + triton_context_call(&shaper_ctx, (triton_event_func)load_time_ranges, NULL); } -- cgit v1.2.3