2011-08-05 Ramon Novoa <rnovoa@artica.es>

* lib/PandoraFMS/Core.pm: Changed the return value of 
	  get_first_policy_queue.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4677 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2011-08-05 10:23:22 +00:00
parent fbb62ecbf8
commit a3a6aeda7d
2 changed files with 19 additions and 16 deletions

View File

@ -1,3 +1,8 @@
2011-08-05 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Changed the return value of
get_first_policy_queue.
2011-08-05 Koichiro KIKUCHI <koichiro@rworks.jp>
* pandora_server.redhat.spec: Updated dependecies. Removed perl-XML-SAX

View File

@ -2228,9 +2228,8 @@ sub pandora_process_policy_queue ($) {
while(1) {
my $operation = enterprise_hook('get_first_policy_queue', [$dbh]);
$operation = @{$operation}[0];
next unless (defined ($operation) && $operation ne '');
if(defined($operation)) {
if($operation->{'operation'} eq 'apply' || $operation->{'operation'} eq 'apply_db') {
enterprise_hook('pandora_apply_policy', [$dbh, $pa_config, $operation->{'id_policy'}, $operation->{'id_agent'}, $operation->{'id'}, $operation->{'operation'}]);
}
@ -2244,7 +2243,6 @@ sub pandora_process_policy_queue ($) {
}
enterprise_hook('pandora_finish_queue_operation', [$dbh, $operation->{'id'}]);
}
# Check the queue each 5 seconds
sleep (5);