summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba21f4c)
raw | patch | inline | side by side (parent: ba21f4c)
author | Florian Forster <octo@huhu.verplant.org> | |
Wed, 5 Mar 2008 13:15:02 +0000 (14:15 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 5 Mar 2008 13:15:02 +0000 (14:15 +0100) |
The first issue is a simple copy'n'paste error, the second a nasty oversight.
src/utils_threshold.c | patch | blob | history |
diff --git a/src/utils_threshold.c b/src/utils_threshold.c
index ea4b5916201cd28b0626194c9e54b29ee8cd8954..d0ab2b9f430948c72960a487dec38ae3c6c9c61a 100644 (file)
--- a/src/utils_threshold.c
+++ b/src/utils_threshold.c
}
if (strcasecmp (ci->key, "WarningMax") == 0)
- th->warning_min = ci->values[0].value.number;
+ th->warning_max = ci->values[0].value.number;
else
- th->failure_min = ci->values[0].value.number;
+ th->failure_max = ci->values[0].value.number;
return (0);
} /* int ut_config_type_max */
int is_failure = 0;
if ((th->flags & UT_FLAG_INVERT) != 0)
+ {
is_inverted = 1;
+ is_warning--;
+ is_failure--;
+ }
if ((!isnan (th->failure_min) && (th->failure_min > values[i]))
|| (!isnan (th->failure_max) && (th->failure_max < values[i])))
- is_failure = is_inverted - 1;
+ is_failure++;
if ((!isnan (th->warning_min) && (th->warning_min > values[i]))
|| (!isnan (th->warning_max) && (th->warning_max < values[i])))
- is_warning = is_inverted - 1;
+ is_warning++;
if ((is_failure != 0) || (is_warning != 0))
{