Code

postgresql plugin: Fixed config key check for <Writer> block.
authorSebastian Harl <sh@tokkee.org>
Wed, 24 Oct 2012 16:33:28 +0000 (18:33 +0200)
committerSebastian Harl <sh@tokkee.org>
Wed, 24 Oct 2012 16:33:28 +0000 (18:33 +0200)
A missing "else" caused incorrect “Ignoring unknown config key "Statement"”
warning messages.

src/postgresql.c

index 9aa7a67510be6fcf69a6fe585c963ce04cddf1cc..594fa32e7b4677af6ed7d5be6427725a51711503 100644 (file)
@@ -992,7 +992,7 @@ static int c_psql_config_writer (oconfig_item_t *ci)
 
                if (strcasecmp ("Statement", c->key) == 0)
                        status = cf_util_get_string (c, &writer->statement);
-               if (strcasecmp ("StoreRates", c->key) == 0)
+               else if (strcasecmp ("StoreRates", c->key) == 0)
                        status = cf_util_get_boolean (c, &writer->store_rates);
                else
                        log_warn ("Ignoring unknown config key \"%s\".", c->key);