diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index ba599a747f..6d20695550 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,9 @@ +2014-09-06 Junichi Satoh + + * lib/PandoraFMS/Core.pm: Fixed that unknown modules are never + recovered when module data is received correctly in/after the + race condition (module execution time exceeds its interval). + 2014-09-03 Ramon Novoa * lib/PandoraFMS/Tools.pm: Added basic support to log to syslog. diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index da75f3e8fb..f351d19d8d 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -4223,7 +4223,7 @@ sub pandora_module_unknown ($$) { # Set the module state to normal logger ($pa_config, "Module " . $module->{'nombre'} . " is going to NORMAL", 10); - db_do ($dbh, 'UPDATE tagente_estado SET last_known_status = estado, last_status = 0, estado = 0 WHERE id_agente_estado = ?', $module->{'id_agente_estado'}); + db_do ($dbh, 'UPDATE tagente_estado SET last_status = 0, estado = 0 WHERE id_agente_estado = ?', $module->{'id_agente_estado'}); # Get agent information my $agent = get_db_single_row ($dbh, 'SELECT * @@ -4265,7 +4265,7 @@ sub pandora_module_unknown ($$) { else { # Set the module state to unknown logger ($pa_config, "Module " . $module->{'nombre'} . " is going to UNKNOWN", 10); - db_do ($dbh, 'UPDATE tagente_estado SET last_known_status = estado, last_status = 3, estado = 3 WHERE id_agente_estado = ?', $module->{'id_agente_estado'}); + db_do ($dbh, 'UPDATE tagente_estado SET last_status = 3, estado = 3 WHERE id_agente_estado = ?', $module->{'id_agente_estado'}); # Get agent information my $agent = get_db_single_row ($dbh, 'SELECT * FROM tagente WHERE id_agente = ?', $module->{'id_agente'});