amqp plugin: Enable the "StoreRates" option only when configuring a "Publish" block.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 6 Aug 2010 11:54:23 +0000 (13:54 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Fri, 6 Aug 2010 11:54:23 +0000 (13:54 +0200)
src/amqp.c

index 1924ce7..c136c00 100644 (file)
@@ -687,7 +687,7 @@ static int camqp_config_connection (oconfig_item_t *ci, /* {{{ */
             else
                 conf->delivery_mode = CAMQP_DM_VOLATILE;
         }
-        else if (strcasecmp ("StoreRates", child->key) == 0)
+        else if ((strcasecmp ("StoreRates", child->key) == 0) && publish)
             status = cf_util_get_boolean (child, &conf->store_rates);
         else
             WARNING ("amqp plugin: Ignoring unknown "