diff --git a/src/threshold.c b/src/threshold.c
index 391ee932aed1acf208bbd75c5fb56b243605ae0d..a70ec8af441f723a1f381b50c8215c6e9c01b89b 100644 (file)
--- a/src/threshold.c
+++ b/src/threshold.c
{ /* {{{ */
int i;
int status = 0;
+ int old_size = c_avl_size (threshold_tree);
threshold_t th;
break;
}
- if (c_avl_size (threshold_tree) > 0) {
+ /* register callbacks if this is the first time we see a valid config */
+ if ((old_size == 0) && (c_avl_size (threshold_tree) > 0))
+ {
plugin_register_missing ("threshold", ut_missing,
/* user data = */ NULL);
plugin_register_write ("threshold", ut_check_threshold,