threshold_t th;
+ if (threshold_tree == NULL)
+ {
+ threshold_tree = avl_create ((void *) strcmp);
+ if (threshold_tree == NULL)
+ {
+ ERROR ("ut_config: avl_create failed.");
+ return (-1);
+ }
+ }
+
memset (&th, '\0', sizeof (th));
th.min = NAN;
th.max = NAN;
--- /dev/null
+/**
+ * collectd - src/utils_threshold.h
+ * Copyright (C) 2007 Florian octo Forster
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; only version 2 of the License is applicable.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Florian octo Forster <octo at verplant.org>
+ **/
+
+#ifndef UTILS_THRESHOLD_H
+#define UTILS_THRESHOLD_H 1
+
+#include "collectd.h"
+#include "liboconfig/oconfig.h"
+
+int ut_config (const oconfig_item_t *ci);
+
+#endif /* UTILS_THRESHOLD_H */