From 07af5da2d2a1a427309c25e958988ff767677a90 Mon Sep 17 00:00:00 2001 From: slerena Date: Tue, 20 Oct 2009 23:35:05 +0000 Subject: [PATCH] 2009-10-21 Sancho Lerena First bug detected & fixed after RC1, whoah :/ * lib/PandoraFMS/Core.pm: Max/Min alert logic is inverted on match check box/switch option in interface. Fixed in server code. This is applicable only on max & min alert (when used both). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2043 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 8 ++++++++ pandora_server/lib/PandoraFMS/Core.pm | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 3e16f7d537..7361eb0fdf 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,11 @@ +2009-10-21 Sancho Lerena + + First bug detected & fixed after RC1, whoah :/ + + * lib/PandoraFMS/Core.pm: Max/Min alert logic is inverted on match check + box/switch option in interface. Fixed in server code. This is applicable + only on max & min alert (when used both). + 2009-10-20 Sancho Lerena RC1 Release date diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index aa0c8c75ed..6bb1c3d22b 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -156,7 +156,7 @@ sub pandora_evaluate_alert ($$$$$$) { return $status if ($alert->{'type'} eq "max" && $data <= $alert->{'max_value'}); if ($alert->{'type'} eq "max_min") { - if ($alert->{'matches_value'} == 1) { + if ($alert->{'matches_value'} != 1) { return $status if ($data <= $alert->{'min_value'} && $data >= $alert->{'max_value'}); } else {