2010-07-26 Ramon Novoa <rnovoa@artica.es>

* lib/PandoraFMS/Core.pm: Do not compress data for async modules.

        * lib/PandoraFMS/DataServer.pm: Check that the file exists before
          trying to parse the XML to avoid XML::Simple error messages.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3060 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
ramonn 2010-07-26 11:51:49 +00:00
parent 883d142545
commit 8295dcbdf8
3 changed files with 21 additions and 11 deletions

View File

@ -1,3 +1,10 @@
2010-07-26 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Do not compress data for async modules.
* lib/PandoraFMS/DataServer.pm: Check that the file exists before
trying to parse the XML to avoid XML::Simple error messages.
2010-07-22 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/DataServer.pm: Sort files by creation date before

View File

@ -767,8 +767,8 @@ sub pandora_process_module ($$$$$$$$$;$) {
$current_utimestamp, $timestamp, $module->{'id_agente'}, $current_interval, $server_id,
$utimestamp, ($save == 1) ? $timestamp : $agent_status->{'last_try'}, $module->{'id_agente_modulo'});
# Save module data
if ($module_type eq "log4x" || $save == 1) {
# Save module data. Async and log4x modules are not compressed.
if ($module_type =~ m/(async)|(log4x)/) || $save == 1) {
save_module_data ($dataObject, $module, $module_type, $utimestamp, $dbh);
}
}

View File

@ -127,6 +127,9 @@ sub data_consumer ($$) {
$file_name .= "/" unless (substr ($file_name, -1, 1) eq '/');
$file_name .= $task;
# Double check that the file exists
return unless (-f $file_name);
# Try to parse the XML 3 times
my $xml_data;