2009-01-21 Evi Vanoost <vanooste@rcbi.rochester.edu>

* 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
This commit is contained in:
guruevi 2009-01-21 14:53:18 +00:00
parent e94b1019cb
commit 38513eedf7
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2009-01-21 Evi Vanoost <vanooste@rcbi.rochester.edu>
* lib/PandoraFMS/DB.pm: Fixes incremental modules
2009-01-21 Ramon Novoa <rnovoa@artica.es>
* pandora_server/lib/PandoraFMS/Config.pm: Updated configuration

View File

@ -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);
}
}