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:
parent
308fc2dc5f
commit
af9225f72f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue