2012-04-20 Ramon Novoa <rnovoa@artica.es>

* lib/PandoraFMS/Core.pm: Merged from 4.0 branch. Do not try to reset
	  the internal counter unless it is > 0. Fixed a warning.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6083 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
ramonn 2012-04-23 09:44:48 +00:00
parent c60a24b415
commit a09ee7b29a
2 changed files with 10 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2012-04-20 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Merged from 4.0 branch. Do not try to reset
the internal counter unless it is > 0. Fixed a warning.
2012-04-20 Sergio Martin <sergio.martin@artica.es>
* lib/PandoraFMS/Core.pm: Setted last_reference to current utimestamp

View File

@ -323,7 +323,7 @@ sub pandora_evaluate_alert ($$$$$$$;$$$) {
# Recover takes precedence over cease
$status = 4 if ($alert->{'recovery_notify'} == 1);
} elsif ($utimestamp > $limit_utimestamp) {
} elsif ($utimestamp > $limit_utimestamp && $alert->{'internal_counter'} > 0) {
$status = 5;
}
@ -1916,16 +1916,15 @@ sub process_data ($$$$$) {
# Process INC modules
if ($module_type =~ m/_inc$/) {
$data = process_inc_data ($data, $module, $utimestamp, $dbh);
# Same timestamp as previous data. Discard.
return undef if($data == -1);
# Not an error, no previous data
if (!defined($data)){
$data_object->{'data'} = 0;
return 0;
}
#return 0 unless defined ($data);
# Same timestamp as previous data. Discard.
return undef if($data == -1);
}
# Post process