From f1ec7d23397a367fe3eefc56ed118d31a59d86e6 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Thu, 10 Oct 2019 17:23:19 +0200 Subject: [PATCH] minor fix in str comparison --- pandora_server/lib/PandoraFMS/DiscoveryServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index d1228e9ae0..51abd3c022 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -585,7 +585,7 @@ sub PandoraFMS::Recon::Base::create_agent($$) { # Resolve hostnames. my $host_name = (($self->{'resolve_names'} == 1) ? gethostbyaddr(inet_aton($device), AF_INET) : $device); # Fallback to device IP if host name could not be resolved. - $host_name = $device if (!defined($host_name) || $host_name == ''); + $host_name = $device if (!defined($host_name) || $host_name eq ''); my $agent = locate_agent($self->{'pa_config'}, $self->{'dbh'}, $host_name); my ($agent_id, $agent_learning);