diff --git a/scripts/zmfilter.pl.in b/scripts/zmfilter.pl.in index ac5d7b6e0..e8f8d998f 100755 --- a/scripts/zmfilter.pl.in +++ b/scripts/zmfilter.pl.in @@ -196,10 +196,11 @@ my $last_action = 0; while( 1 ) { - if ( (time() - $last_action) > $Config{ZM_FILTER_RELOAD_DELAY} ) + my $now = time; + if ( ($now - $last_action) > $Config{ZM_FILTER_RELOAD_DELAY} ) { Debug( "Reloading filters\n" ); - $last_action = time(); + $last_action = $now; $filters = getFilters( $filter_parm ); } @@ -632,7 +633,7 @@ sub checkFilter { if ( $delete_ok ) { - Info( "Deleting event $event->{Id}\n" ); + Info( "Deleting event $event->{Id} from Monitor $event->{MonitorId}\n" ); # Do it individually to avoid locking up the table for new events my $sql = "delete from Events where Id = ?"; my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare '$sql': ".$dbh->errstr() );