From cae68eac357f10c0e7ce05a657fb115500877a75 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 2 Feb 2021 12:27:01 +0100 Subject: [PATCH] Fixed latency modules --- pandora_server/lib/PandoraFMS/NetworkServer.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/NetworkServer.pm b/pandora_server/lib/PandoraFMS/NetworkServer.pm index 9fa9bf5741..d7b6519109 100644 --- a/pandora_server/lib/PandoraFMS/NetworkServer.pm +++ b/pandora_server/lib/PandoraFMS/NetworkServer.pm @@ -496,9 +496,11 @@ sub exec_network_module ($$$$) { } elsif ($id_tipo_modulo == 7){ # ICMP (data for latency in ms) $module_data = pandora_ping_latency ($pa_config, $ip_target, $timeout, $retries); - + if (defined($module_data)) { - $module_result = 1; # Unsuccessful + $module_result = 0; # Successful + } else { + $module_result = 1; # Unsuccessful: Cannot reach target. } }