From 21b08bf66701a2c2442b1cc22d91b4c2b5a19169 Mon Sep 17 00:00:00 2001 From: slerena Date: Mon, 27 Dec 2010 15:51:54 +0000 Subject: [PATCH] 2010-12-27 Sancho Lerena * util/pandora_sync_db.pl: Fixed a undefined condition. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3710 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 4 ++++ pandora_server/util/pandora_sync_db.pl | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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]);