From 0b366803f7da2ecf49c8cb295655dc6ae30117a7 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 23 Jan 2008 11:26:58 +0100 Subject: [PATCH] src/utils_threshold.c: Check that the block does not have any arguments. --- TODO | 1 - src/utils_threshold.c | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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); -- 2.11.0