diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index d2c81bb8b4..8cb9edb721 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -8,6 +8,10 @@ * lib/PandoraFMS/PluginServer.pm: Removed several "Use of uninitialized i value in string" errors. + * lib/PandoraFMS/Core.pm: Fixed more ugly notices due uninitialized vars. + + * util/recon_scripts/snmpdevices.pl: Fixed due new interface. + 2013-02-28 Ramon Novoa * bin/pandora_server: Undid the previous commit since forking after diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index fcad6340e9..a12fd4bec5 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1058,6 +1058,11 @@ sub pandora_process_module ($$$$$$$$$;$) { } my $last_try = ($1 == 0) ? 0 : timelocal($6, $5, $4, $3, $2 - 1, $1 - 1900); + + if (!defined($agent_status->{'datos'})){ + $agent_status->{'datos'} = ""; + } + my $save = ($module->{'history_data'} == 1 && ($agent_status->{'datos'} ne $processed_data || $last_try < ($utimestamp - 86400))) ? 1 : 0; db_do ($dbh, 'UPDATE tagente_estado diff --git a/pandora_server/util/recon_scripts/snmpdevices.pl b/pandora_server/util/recon_scripts/snmpdevices.pl index 918790e440..14e7baf2af 100755 --- a/pandora_server/util/recon_scripts/snmpdevices.pl +++ b/pandora_server/util/recon_scripts/snmpdevices.pl @@ -190,7 +190,7 @@ foreach $addr_item (@net_addr_list) { update_recon_task ($dbh, $task_id, ceil ($i / ($total_hosts / 100))); my $alive = 0; - if (pandora_ping (\%conf, $addr) == 1) { + if (pandora_ping (\%conf, $addr, 5, 2) == 1) { $alive = 1; } @@ -321,7 +321,7 @@ foreach $addr_item (@net_addr_list) { my $addr = $addr_item; my $alive = 0; - if (pandora_ping (\%conf, $addr) == 1) { + if (pandora_ping (\%conf, $addr, 5 ,2) == 1) { $alive = 1; }