diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index 81e7d5993f..7966e97de0 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -1421,6 +1421,8 @@ sub scan_subnet($) { # By default 200, (20 * 10) my $host_block_size = $self->{'block_size'}; + $host_block_size = 50 unless defined($self->{'block_size'}); + # The first 50% of the recon task approx. my $step = 25.0 / scalar(@subnets) / (($total_hosts / $host_block_size)+1); my $subnet_step = 50.0 / (($total_hosts / $host_block_size)+1); diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 92c6a06cd5..76aaefc344 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -1453,6 +1453,8 @@ sub pandora_block_ping($@) { my ($pa_config, @hosts) = @_; my ($cmd, $output); + return () if is_empty(@hosts); + if (-x $pa_config->{'fping'}) { # fping timeout in milliseconds $cmd = $pa_config->{'fping'} . " -a -q -t " . (1000 * $pa_config->{'networktimeout'}) . " " . (join (' ', @hosts));