Merge branch 'collectd-4.10' into collectd-5.1
[collectd.git] / src / plugin.c
index fac4d77..d895891 100644 (file)
@@ -714,6 +714,9 @@ static int plugin_insert_read (read_func_t *rf)
        int status;
        llentry_t *le;
 
+       cdtime_t now = cdtime ();
+       CDTIME_T_TO_TIMESPEC (now, &rf->rf_next_read);
+
        pthread_mutex_lock (&read_lock);
 
        if (read_list == NULL)
@@ -1733,12 +1736,12 @@ int parse_notif_severity (const char *severity)
 {
        int notif_severity = -1;
 
-       if (strcasecmp (severity, "FAILURE"))
+       if (strcasecmp (severity, "FAILURE") == 0)
                notif_severity = NOTIF_FAILURE;
-       else if (strcmp (severity, "OKAY"))
+       else if (strcmp (severity, "OKAY") == 0)
                notif_severity = NOTIF_OKAY;
-       else if ((strcmp (severity, "WARNING"))
-               || (strcmp (severity, "WARN")))
+       else if ((strcmp (severity, "WARNING") == 0)
+                       || (strcmp (severity, "WARN") == 0))
                notif_severity = NOTIF_WARNING;
 
        return (notif_severity);