mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
avoid div by 0 error while scanning networks with no hosts
This commit is contained in:
parent
4815dce8aa
commit
694d82e522
@ -1502,6 +1502,7 @@ sub PandoraFMS::Recon::Base::apply_monitoring($) {
|
||||
|
||||
my @hosts = keys %{$self->{'agents_found'}};
|
||||
|
||||
if (scalar @hosts > 0) {
|
||||
$self->{'step'} = STEP_MONITORING;
|
||||
# From 80% to 90%.
|
||||
my ($progress, $step) = (80, 10.0 / scalar(@hosts));
|
||||
@ -1526,6 +1527,8 @@ sub PandoraFMS::Recon::Base::apply_monitoring($) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$self->{'c_network_percent'} = 100;
|
||||
$self->call('update_progress', $progress);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user