summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c8
-rw-r--r--accel-pppd/ctrl/pptp/pptp.c6
-rw-r--r--accel-pppd/ppp/ipcp_opt_ipaddr.c4
-rw-r--r--accel-pppd/ppp/ipv6cp_opt_intfid.c6
-rw-r--r--accel-pppd/ppp/ppp.c4
-rw-r--r--accel-pppd/radius/radius.c12
-rw-r--r--accel-pppd/shaper/shaper.c6
7 files changed, 23 insertions, 23 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)
diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c
index c00f29f..e735c72 100644
--- a/accel-pppd/ctrl/pptp/pptp.c
+++ b/accel-pppd/ctrl/pptp/pptp.c
@@ -744,9 +744,9 @@ static void load_config(void)
conf_echo_failure = atoi(opt);
opt = conf_get_opt("pptp", "verbose");
- if (opt && atoi(opt) > 0)
- conf_verbose = 1;
-
+ if (opt && atoi(opt) >= 0)
+ conf_verbose = atoi(opt) > 0;
+
conf_mppe = MPPE_UNSET;
opt = conf_get_opt("pptp", "mppe");
if (opt) {
diff --git a/accel-pppd/ppp/ipcp_opt_ipaddr.c b/accel-pppd/ppp/ipcp_opt_ipaddr.c
index 44dd3dd..e5246d5 100644
--- a/accel-pppd/ppp/ipcp_opt_ipaddr.c
+++ b/accel-pppd/ppp/ipcp_opt_ipaddr.c
@@ -177,8 +177,8 @@ static void load_config(void)
const char *opt;
opt = conf_get_opt("ppp", "check-ip");
- if (opt && atoi(opt) > 0)
- conf_check_exists = 1;
+ if (opt && atoi(opt) >= 0)
+ conf_check_exists = atoi(opt) > 0;
}
static void ipaddr_opt_init()
diff --git a/accel-pppd/ppp/ipv6cp_opt_intfid.c b/accel-pppd/ppp/ipv6cp_opt_intfid.c
index 21f0b93..a46ae17 100644
--- a/accel-pppd/ppp/ipv6cp_opt_intfid.c
+++ b/accel-pppd/ppp/ipv6cp_opt_intfid.c
@@ -284,9 +284,9 @@ static void load_config(void)
const char *opt;
opt = conf_get_opt("ppp", "check-ip");
- if (opt && atoi(opt) > 0)
- conf_check_exists = 1;
-
+ if (opt && atoi(opt) >= 0)
+ conf_check_exists = atoi(opt) > 0;
+
opt = conf_get_opt("ppp", "ipv6-intf-id");
if (opt) {
if (!strcmp(opt, "random"))
diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c
index f5877ed..5363094 100644
--- a/accel-pppd/ppp/ppp.c
+++ b/accel-pppd/ppp/ppp.c
@@ -595,8 +595,8 @@ static void load_config(void)
const char *opt;
opt = conf_get_opt("ppp", "verbose");
- if (opt && atoi(opt) > 0)
- conf_ppp_verbose = 1;
+ if (opt && atoi(opt) >= 0)
+ conf_ppp_verbose = atoi(opt) > 0;
opt = conf_get_opt("ppp", "unit-cache");
if (opt && atoi(opt) > 0)
diff --git a/accel-pppd/radius/radius.c b/accel-pppd/radius/radius.c
index 5313fe1..bae5876 100644
--- a/accel-pppd/radius/radius.c
+++ b/accel-pppd/radius/radius.c
@@ -542,13 +542,13 @@ static int load_config(void)
conf_acct_timeout = atoi(opt);
opt = conf_get_opt("radius", "verbose");
- if (opt && atoi(opt) > 0)
- conf_verbose = 1;
-
+ if (opt && atoi(opt) >= 0)
+ conf_verbose = atoi(opt) > 0;
+
opt = conf_get_opt("radius", "interim-verbose");
- if (opt && atoi(opt) > 0)
- conf_interim_verbose = 1;
-
+ if (opt && atoi(opt) >= 0)
+ conf_interim_verbose = atoi(opt) > 0;
+
opt = conf_get_opt("radius", "nas-ip-address");
if (opt)
conf_nas_ip_address = inet_addr(opt);
diff --git a/accel-pppd/shaper/shaper.c b/accel-pppd/shaper/shaper.c
index 2b749c9..d5a376b 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);
}