From: Florian Forster Date: Fri, 25 Sep 2009 07:27:50 +0000 (+0200) Subject: openvpn plugin: Don't use negated config options. X-Git-Tag: collectd-4.9.0~37^2~11 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=845cac1eaa492eb59d86d52a2367a2c22198f2b4;p=collectd.git openvpn plugin: Don't use negated config options. “NoCompression” → “Compression”. --- diff --git a/src/openvpn.c b/src/openvpn.c index e65a00a6..cc7090bf 100644 --- a/src/openvpn.c +++ b/src/openvpn.c @@ -54,7 +54,7 @@ static int store_compression = 1; static const char *config_keys[] = { "StatusFile", - "NoCompression" + "Compression" }; static int config_keys_num = STATIC_ARRAY_SIZE (config_keys); @@ -523,19 +523,15 @@ static int openvpn_config (const char *key, const char *value) DEBUG ("openvpn plugin: status file \"%s\" added", temp->file); } - else if (strcasecmp ("NoCompression", key) == 0) + else if (strcasecmp ("Compression", key) == 0) { - if ((strcasecmp ("True", value) == 0) - || (strcasecmp ("Yes", value) == 0) - || (strcasecmp ("On", value) == 0)) + if (IS_TRUE (value)) + store_compression = 1; + else { store_compression = 0; DEBUG ("openvpn plugin: no 'compression statistcs' collected"); } - else - { - store_compression = 1; - } } else {