changeset 36:53b435244761

More fixes in timestamp handling.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 16 Aug 2009 00:53:58 +0300
parents 57ef73cbad91
children 6e1f90d114bc
files maltfilter
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/maltfilter	Sun Aug 16 00:47:51 2009 +0300
+++ b/maltfilter	Sun Aug 16 00:53:58 2009 +0300
@@ -575,12 +575,12 @@
     $struct->{$mip}{"reason"}{$mclass}{"msg"} = $mreason;
   }
 
-  if (!defined($struct->{$mip}{"date1"})) {
+  if (!defined($struct->{$mip}{"date1"}) || ($mdate > 0 && $struct->{$mip}{"date1"} < 0)) {
     $struct->{$mip}{"date1"} = $mdate;
   }
   $struct->{$mip}{"date2"} = $mdate;
     
-  if (!defined($struct->{$mip}{"reason"}{$mclass}{"date2"})) {
+  if (!defined($struct->{$mip}{"reason"}{$mclass}{"date2"}) || ($mdate > 0 && $struct->{$mip}{"reason"}{$mclass}{"date2"} < 0)) {
     $struct->{$mip}{"reason"}{$mclass}{"date2"} = $mdate;
   }
   $struct->{$mip}{"reason"}{$mclass}{"date2"} = $mdate;