mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Minor fix
This commit is contained in:
parent
2ac4ae3a18
commit
8b771f6a35
@ -584,6 +584,8 @@ sub PandoraFMS::Recon::Base::create_agent($$) {
|
|||||||
|
|
||||||
# Resolve hostnames.
|
# Resolve hostnames.
|
||||||
my $host_name = (($self->{'resolve_names'} == 1) ? gethostbyaddr(inet_aton($device), AF_INET) : $device);
|
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 == '');
|
||||||
my $agent = locate_agent($self->{'pa_config'}, $self->{'dbh'}, $host_name);
|
my $agent = locate_agent($self->{'pa_config'}, $self->{'dbh'}, $host_name);
|
||||||
|
|
||||||
my ($agent_id, $agent_learning);
|
my ($agent_id, $agent_learning);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user