threshold plugin: Dont check for interesting values if there are no thresholds.
authorSebastian Harl <sh@tokkee.org>
Fri, 17 Jun 2011 07:05:48 +0000 (09:05 +0200)
committerSebastian Harl <sh@tokkee.org>
Fri, 17 Jun 2011 07:05:48 +0000 (09:05 +0200)
src/threshold.c

index 7bbc59e..88616e9 100644 (file)
@@ -990,6 +990,10 @@ static int ut_missing (const value_list_t *vl,
   char identifier[6 * DATA_MAX_NAME_LEN];
   notification_t n;
 
+  /* dispatch notifications for "interesting" values only */
+  if (threshold_tree == NULL)
+    return (0);
+
   th = threshold_search (vl);
   if (th == NULL)
     return (0);