From 13df28711f62398005db0808d326445680176455 Mon Sep 17 00:00:00 2001 From: koichirok Date: Mon, 25 Nov 2013 22:03:07 +0000 Subject: [PATCH] 2013-11-26 KIKUCHI koichiro * lib/PandoraFMS/DB.pm: Fixed get_agent_status to return warning status correctly. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9125 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/lib/PandoraFMS/DB.pm | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index f5df71c5a3..2c4a6f285c 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2013-11-26 KIKUCHI koichiro + + * lib/PandoraFMS/DB.pm: Fixed get_agent_status to return warning status + correctly. + 2013-11-13 Ramon Novoa * lib/PandoraFMS/DataServer.pm: Fixed a bug when a parent was defined but diff --git a/pandora_server/lib/PandoraFMS/DB.pm b/pandora_server/lib/PandoraFMS/DB.pm index 6fc77046e2..c5f93dc692 100644 --- a/pandora_server/lib/PandoraFMS/DB.pm +++ b/pandora_server/lib/PandoraFMS/DB.pm @@ -352,7 +352,7 @@ sub get_agent_status ($$$) { # AGENT_MODULE_STATUS_CRITICAL_ALERT # AGENT_MODULE_STATUS_CRITICAL_BAD # AGENT_MODULE_STATUS_WARNING - # AGENT_MODULE_STATUS_UNKNOW + # AGENT_MODULE_STATUS_UNKNOWN # AGENT_MODULE_STATUS_NORMAL if ($m_status == 4) { $module_status = 4; @@ -365,7 +365,7 @@ sub get_agent_status ($$$) { if ($m_status == 2) { $module_status = 2; } - else { + elsif ($module_status != 2) { if ($m_status == 0) { $module_status = 0; }