Code

src/utils_threshold.c: Check that the <Threshold> block does not have any arguments.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Wed, 23 Jan 2008 10:26:58 +0000 (11:26 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Wed, 23 Jan 2008 10:26:58 +0000 (11:26 +0100)
TODO
src/utils_threshold.c

diff --git a/TODO b/TODO
index 4a5aef96a513364a9b43dcb989606d12c10bcabc..bb95181bfe059c17b828e1cbe6c1943d72653ca1 100644 (file)
--- 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 `<Threshold>' can be used.
 * Fix the libvirt plugin.
 
 src/battery.c: commend not working code.
index 9365a4a2e12e6ae783a2a959d09ff15e02af1f80..15ccf9c3709cede5e6da488fac10b11db7c539d2 100644 (file)
@@ -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);