diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 7e7ed108e7..f6d7c755ea 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,7 @@ +2010-12-27 Sancho Lerena + + * util/pandora_sync_db.pl: Fixed a undefined condition. + 2010-12-22 Sergio Martin * util/pandora_manage.pl: Fixed duplicate module creation diff --git a/pandora_server/util/pandora_sync_db.pl b/pandora_server/util/pandora_sync_db.pl index 52edbd3481..ac0f4adc82 100755 --- a/pandora_server/util/pandora_sync_db.pl +++ b/pandora_server/util/pandora_sync_db.pl @@ -73,7 +73,12 @@ print "\n[*] $agents_deleted agents deleted on destination.\n" unless $agents_de print "\n[*] Preparing modules correlation.\n"; my $id_agentmodule_comparation = enterprise_hook('sync_compare_id_agent_modules', [$dbh_source, $dbh_dest, $id_agent_comparation, \$errors_modules]); -my @id_agentmodule_comparation = @{$id_agentmodule_comparation}; + +my @id_agentmodule_comparation; +if ($id_agentmodule_comparation ne ""){ + @id_agentmodule_comparation = @{$id_agentmodule_comparation}; +} + print "\n[*] Checking destination modules missed on source.\n"; my $modules_deleted = enterprise_hook('sync_delete_dst_missed_agent_modules', [$dbh_source, $dbh_dest, $id_agent_comparation, \$errors_modules]);