From: Florian Forster Date: Wed, 23 Jan 2008 10:26:58 +0000 (+0100) Subject: src/utils_threshold.c: Check that the block does not have any arguments. X-Git-Tag: collectd-4.3.0beta0~27 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0b366803f7da2ecf49c8cb295655dc6ae30117a7;p=collectd.git src/utils_threshold.c: Check that the block does not have any arguments. --- diff --git a/TODO b/TODO index 4a5aef96..bb95181b 100644 --- a/TODO +++ b/TODO @@ -2,7 +2,6 @@ For version 4.3: * Add notification stuff to the network plugin * Add notification stuff to the unixsock plugin * Add separate warning/critical thresholds. -* Fix the config parsing so that `' can be used. * Fix the libvirt plugin. src/battery.c: commend not working code. diff --git a/src/utils_threshold.c b/src/utils_threshold.c index 9365a4a2..15ccf9c3 100644 --- a/src/utils_threshold.c +++ b/src/utils_threshold.c @@ -380,6 +380,13 @@ int ut_config (const oconfig_item_t *ci) threshold_t th; + if (ci->values_num != 0) + { + ERROR ("threshold values: The `Threshold' block may not have any " + "arguments."); + return (-1); + } + if (threshold_tree == NULL) { threshold_tree = c_avl_create ((void *) strcmp);