From dc05a7cce36e82ddd5fce2e5ae286e16e688de1a Mon Sep 17 00:00:00 2001 From: ramonn Date: Wed, 10 Mar 2010 13:20:56 +0000 Subject: [PATCH] 2010-03-10 Ramon Novoa * lib/PandoraFMS/Core.pm: Set tagente_estado.current_interval to tagente.intervalo if tagente_modulo.module_interval is 0. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2498 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/lib/PandoraFMS/Core.pm | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 9c6dd26334..3d2f2b2cb6 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2010-03-10 Ramon Novoa + + * lib/PandoraFMS/Core.pm: Set tagente_estado.current_interval to + tagente.intervalo if tagente_modulo.module_interval is 0. + 2010-03-08 Pablo de la ConcepciĆ³n * lib/PandoraFMS/GIS.pm, lib/PandoraFMS/GeoIP.pm: Modified to put diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index d711bb5b60..f3dc8fc225 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -755,10 +755,11 @@ sub pandora_process_module ($$$$$$$$$;$) { my $last_try = ($1 == 0) ? 0 : timelocal($6, $5, $4, $3, $2 - 1, $1 - 1900); my $save = ($module->{'history_data'} == 1 && ($agent_status->{'datos'} ne $processed_data || $last_try < (time() - 86400))) ? 1 : 0; + my $current_interval = ($module->{'module_interval'} == 0 ? $agent->{'intervalo'} : $module->{'module_interval'}); db_do ($dbh, 'UPDATE tagente_estado SET datos = ?, estado = ?, last_status = ?, status_changes = ?, utimestamp = ?, timestamp = ?, id_agente = ?, current_interval = ?, running_by = ?, last_execution_try = ?, last_try = ? WHERE id_agente_modulo = ?', $processed_data, $status, $last_status, $status_changes, - $current_utimestamp, $timestamp, $module->{'id_agente'}, $module->{'module_interval'}, $server_id, + $current_utimestamp, $timestamp, $module->{'id_agente'}, $current_interval, $server_id, $utimestamp, ($save == 1) ? $timestamp : $agent_status->{'last_try'}, $module->{'id_agente_modulo'}); # Save module data