2009-11-19 Ramon Novoa <rnovoa@artica.es>

* Check for empty module/agent when processing
          module data.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2116 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
ramonn 2009-11-19 00:44:30 +00:00
parent a190b7c9d1
commit 0db62306ad
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-11-19 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Check for empty module/agent when processing
module data.
2009-11-13 Ramon Novoa <rnovoa@artica.es>
* conf/pandora_server.conf: Updated configuration tokens.

View File

@ -528,7 +528,7 @@ sub pandora_process_module ($$$$$$$$$) {
logger($pa_config, "Processing module '" . $module->{'nombre'} . "' for agent " . (defined ($agent) ? "'" . $agent->{'nombre'} . "'" : 'ID ' . $module->{'id_agente'}) . ".", 10);
# Get module type
if (! defined ($module_type)) {
if (! defined ($module_type) || $module_type eq '') {
$module_type = get_db_value ($dbh, 'SELECT nombre FROM ttipo_modulo WHERE id_tipo = ?', $module->{'id_tipo_modulo'});
if (! defined ($module_type)) {
logger($pa_config, "Invalid module type ID " . $module->{'id_tipo_modulo'} . " module '" . $module->{'nombre'} . "' agent " . (defined ($agent) ? "'" . $agent->{'nombre'} . "'" : 'ID ' . $module->{'id_agente'}) . ".", 10);
@ -538,7 +538,7 @@ sub pandora_process_module ($$$$$$$$$) {
}
# Get agent information
if (! defined ($agent)) {
if (! defined ($agent) || $agent eq '') {
$agent = get_db_single_row ($dbh, 'SELECT * FROM tagente WHERE id_agente = ?', $module->{'id_agente'});
if (! defined ($agent)) {
logger($pa_config, "Agent ID " . $module->{'id_agente'} . " not found while processing module '" . $module->{'nombre'} . "'.", 3);