minor fix
This commit is contained in:
parent
7395410831
commit
189d85d659
|
@ -1221,7 +1221,7 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) {
|
||||||
# Update parent relationships.
|
# Update parent relationships.
|
||||||
foreach my $agent (@agents) {
|
foreach my $agent (@agents) {
|
||||||
# Avoid processing if does not exist.
|
# Avoid processing if does not exist.
|
||||||
next unless (defined($agent->{'agent'}{'agent_id'}));
|
next unless (defined($agent->{'agent_id'}));
|
||||||
|
|
||||||
# Avoid processing undefined parents.
|
# Avoid processing undefined parents.
|
||||||
next unless defined($agent->{'parent'});
|
next unless defined($agent->{'parent'});
|
||||||
|
@ -1234,12 +1234,12 @@ sub PandoraFMS::Recon::Base::report_scanned_agents($;$) {
|
||||||
next unless defined($parent);
|
next unless defined($parent);
|
||||||
|
|
||||||
# Is the agent in learning mode?
|
# Is the agent in learning mode?
|
||||||
next unless ($agent->{'agent'}{'modo'} == 1);
|
next unless ($agent->{'modo'} == 1);
|
||||||
|
|
||||||
# Connect the host to its parent.
|
# Connect the host to its parent.
|
||||||
db_do($self->{'dbh'},
|
db_do($self->{'dbh'},
|
||||||
'UPDATE tagente SET id_parent=? WHERE id_agente=?',
|
'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.
|
# Do not edit 'not scaned' agents.
|
||||||
return if is_empty($self->{'agents_found'}{$host}{'agent'});
|
return if is_empty($self->{'agents_found'}{$host}{'agent'});
|
||||||
|
|
||||||
$self->{'agents_found'}{$host}{'parent'} = $parent;
|
$self->{'agents_found'}{$host}{'agent'}{'parent'} = $parent;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue