minor fix in str comparison

This commit is contained in:
fbsanchez 2019-10-10 17:23:19 +02:00
parent cc58cd6515
commit f1ec7d2339
1 changed files with 1 additions and 1 deletions

View File

@ -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);