diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-08-23 14:54:50 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-08-23 14:54:50 +0200 |
commit | b10d6769d214a681f4114fea83b18f1cbc53c501 (patch) | |
tree | 5530f4fef9896e4e6238c706d14abcd04f370ec8 | |
parent | 1f101a5ffe7def8c1fcdf26c8d4e68a620104730 (diff) | |
download | pingu-b10d6769d214a681f4114fea83b18f1cbc53c501.tar.bz2 pingu-b10d6769d214a681f4114fea83b18f1cbc53c501.tar.xz |
pingu_conf: error checking for required-hosts-online and rule-priority
and support hexadecimal values
-rw-r--r-- | src/pingu_conf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pingu_conf.c b/src/pingu_conf.c index 24ef229..6470809 100644 --- a/src/pingu_conf.c +++ b/src/pingu_conf.c @@ -165,9 +165,11 @@ static int pingu_conf_read_iface(struct pingu_conf *conf, char *ifname) } else if (strcmp(key, "gateway-down-action") == 0) { iface->gw_down_action = xstrdup(value); } else if (strcmp(key, "required-hosts-online") == 0) { - iface->required_hosts_online = atoi(value); + r += parse_int(value, &iface->required_hosts_online, + conf->lineno); } else if (strcmp(key, "rule-priority") == 0) { - iface->rule_priority = atoi(value); + r += parse_int(value, &iface->rule_priority, + conf->lineno); } else if (strcmp(key, "load-balance") == 0) { int weight = 0; if (value != NULL) { |