From 38513eedf70983bc030f47b7e210ac133061e450 Mon Sep 17 00:00:00 2001 From: guruevi Date: Wed, 21 Jan 2009 14:53:18 +0000 Subject: [PATCH] 2009-01-21 Evi Vanoost * lib/PandoraFMS/DB.pm: Fixes incremental modules git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1384 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 4 ++++ pandora_server/lib/PandoraFMS/DB.pm | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 70f523aaf6..ae7652cb6d 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,7 @@ +2009-01-21 Evi Vanoost + + * lib/PandoraFMS/DB.pm: Fixes incremental modules + 2009-01-21 Ramon Novoa * pandora_server/lib/PandoraFMS/Config.pm: Updated configuration diff --git a/pandora_server/lib/PandoraFMS/DB.pm b/pandora_server/lib/PandoraFMS/DB.pm index 0e8e2d58c1..a21e27e1f4 100644 --- a/pandora_server/lib/PandoraFMS/DB.pm +++ b/pandora_server/lib/PandoraFMS/DB.pm @@ -1039,8 +1039,8 @@ sub module_generic_data_inc (%$$$$$) { if (is_numeric($data_row[2])){ $data_anterior = $data_row[2]; } - if (is_numeric($data_row[4])){ - $timestamp_anterior = $data_row[4]; + if (is_numeric($data_row[3])){ + $timestamp_anterior = $data_row[3]; } $diferencia = $m_data - $data_anterior; $timestamp_diferencia = $m_utimestamp - $timestamp_anterior; @@ -1062,7 +1062,7 @@ sub module_generic_data_inc (%$$$$$) { } else { # Data exists previously if ($diferencia != 0) { - my $query2 = "UPDATE tagente_datos_inc SET utimestamp = $m_utimestamp, datos = '$m_data' WHERE id_agente_modulo = $id_agente_modulo"; + my $query2 = "UPDATE tagente_datos_inc SET utimestamp = $m_utimestamp, datos = '$m_data' WHERE id_agente_modulo = $id_agente_modulo"; $dbh->do($query2); } }