From f79fb05318fedc5cc01f0001fc34c187ace6ea73 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Thu, 15 Sep 2022 13:19:23 +0200 Subject: [PATCH] Revert "Ent 6978 umbrales inversos fallan" This reverts commit fd372d53d1282bae53fb93bb81178b096b331ed1. --- pandora_server/lib/PandoraFMS/Core.pm | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 589d409357..eda4c5a70c 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -5096,17 +5096,11 @@ sub get_module_status ($$$$) { } # (-inf, critical_min), [critical_max, +inf) else { - if ($critical_min == 0) { - return 1 if ($data > $critical_max); - }elsif ($critical_max == 0) { - return 1 if ($data <= $critical_min); - } else { - return 1 if ($data < $critical_min || $data >= $critical_max); - return 1 if ($data <= $critical_max && $critical_max < $critical_min); - } + return 1 if ($data < $critical_min || $data >= $critical_max); + return 1 if ($data <= $critical_max && $critical_max < $critical_min); } } - + # Warning if ($warning_min ne $warning_max) { # [warning_min, warning_max) @@ -5116,14 +5110,8 @@ sub get_module_status ($$$$) { } # (-inf, warning_min), [warning_max, +inf) else { - if ($warning_min == 0) { - return 2 if ($data > $warning_max); - }elsif ($warning_max == 0) { - return 2 if ($data <= $warning_min); - } else { - return 2 if ($data < $warning_min || $data >= $warning_max); - return 2 if ($data <= $warning_max && $warning_max < $warning_min); - } + return 2 if ($data < $warning_min || $data >= $warning_max); + return 2 if ($data <= $warning_max && $warning_max < $warning_min); } } }