author | Jan Kundrát <jan.kundrat@cesnet.cz> | |
Tue, 11 Mar 2014 10:00:22 +0000 (11:00 +0100) | ||
committer | Jan Kundrát <jan.kundrat@cesnet.cz> | |
Tue, 11 Mar 2014 10:05:08 +0000 (11:05 +0100) | ||
commit | 1a739fc3bfd9627784e35d793452cd2d0da4513d | |
tree | 0cde1944c0e7175c3dc849296f5066b05cc863e8 | tree | snapshot |
parent | 9ea1cc9352ecd3ea9644fa9e93a4f4cd11cd7350 | commit | diff |
thresholds: Fix calculation of hysteresis
The old code would never emit a notification when the value changed between the
WARNING and FAILURE; the reason was that each branch in the switch statement
only checked the "old" thresholds valid for the previously encountered state.
That is wrong and pretty dangerous, as there will be no notification when a
values progresses slowly from OK to WARN to FAIL.
Fixes #578.
The old code would never emit a notification when the value changed between the
WARNING and FAILURE; the reason was that each branch in the switch statement
only checked the "old" thresholds valid for the previously encountered state.
That is wrong and pretty dangerous, as there will be no notification when a
values progresses slowly from OK to WARN to FAIL.
Fixes #578.
src/threshold.c | diff | blob | history |