Check for negative time increments in inc modules.

(cherry picked from commit 91c72f8331)
This commit is contained in:
Ramon Novoa 2015-03-05 16:48:25 +01:00
parent ce9e337cb3
commit dc2e47c1c7
1 changed files with 1 additions and 1 deletions

View File

@ -3320,7 +3320,7 @@ sub process_inc_data ($$$$$) {
}
# Negative increment, reset inc data
if ($data < $data_inc->{'datos'}) {
if ($data < $data_inc->{'datos'} || $utimestamp < $data_inc->{'utimestamp'}) {
db_do ($dbh, 'UPDATE tagente_datos_inc SET datos = ?, utimestamp = ? WHERE id_agente_modulo = ?', $data, $utimestamp, $module->{'id_agente_modulo'});
logger($pa_config, "Discarding data and resetting counter for incremental module " . $module->{'nombre'} . "(module id " . $module->{'id_agente_modulo'} . ").", 10);