From 9305fd17babafe6ef2cb69444cb44bc224be981f Mon Sep 17 00:00:00 2001 From: Calvo Date: Mon, 30 Jan 2023 17:16:20 +0100 Subject: [PATCH] Fix get agent status on unknown modules --- pandora_server/lib/PandoraFMS/DB.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/DB.pm b/pandora_server/lib/PandoraFMS/DB.pm index 338a914ab4..4a42019023 100644 --- a/pandora_server/lib/PandoraFMS/DB.pm +++ b/pandora_server/lib/PandoraFMS/DB.pm @@ -618,8 +618,13 @@ sub get_agent_status ($$$) { $module_status = 2; } elsif ($module_status != 2) { - if ($m_status == 0) { - $module_status = 0; + if ($m_status == 3) { + $module_status = 3; + } + elsif ($module_status != 3) { + if ($m_status == 3) { + $module_status = 3; + } } } } @@ -647,6 +652,8 @@ sub get_agent_status ($$$) { return 3; } } + + print "MS ::::::::::::::".Dumper($module_status); return $module_status; }