From 189d85d659540ca9d414ff371b023cf668587651 Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Mon, 13 Apr 2020 15:30:13 +0200 Subject: [PATCH] minor fix --- pandora_server/lib/PandoraFMS/DiscoveryServer.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm index e2c62d1711..7a5af26d07 100644 --- a/pandora_server/lib/PandoraFMS/DiscoveryServer.pm +++ b/pandora_server/lib/PandoraFMS/DiscoveryServer.pm @@ -1221,7 +1221,7 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) { # Update parent relationships. foreach my $agent (@agents) { # Avoid processing if does not exist. - next unless (defined($agent->{'agent'}{'agent_id'})); + next unless (defined($agent->{'agent_id'})); # Avoid processing undefined parents. next unless defined($agent->{'parent'}); @@ -1234,12 +1234,12 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) { next unless defined($parent); # Is the agent in learning mode? - next unless ($agent->{'agent'}{'modo'} == 1); + next unless ($agent->{'modo'} == 1); # Connect the host to its parent. db_do($self->{'dbh'}, 'UPDATE tagente SET id_parent=? WHERE id_agente=?', - $parent->{'id_agente'}, $agent->{'agent'}{'agent_id'} + $parent->{'id_agente'}, $agent->{'agent_id'} ); } @@ -1612,7 +1612,7 @@ sub PandoraFMS::Recon::Base::set_parent($$$) { # Do not edit 'not scaned' agents. return if is_empty($self->{'agents_found'}{$host}{'agent'}); - $self->{'agents_found'}{$host}{'parent'} = $parent; + $self->{'agents_found'}{$host}{'agent'}{'parent'} = $parent; }