From 845cac1eaa492eb59d86d52a2367a2c22198f2b4 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 25 Sep 2009 09:27:50 +0200 Subject: [PATCH] openvpn plugin: Don't use negated config options. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit “NoCompression” → “Compression”. --- src/openvpn.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) 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 { -- 2.11.0