prelude-correlator/master: Do not reset threshold and alert_on_expire on update.

[email protected] Wed, 17 Jun 2009 18:37:07 +0200 (CEST)
Newsgroups gmane.comp.security.ids.prelude.cvs
Message-ID <[email protected]>
commit 0aee836d8beb0a61964308ccdbf7f58a924508b9
Author: Yoann Vandoorselaere <[email protected]>
Date:   Wed Jun 17 17:57:35 2009 +0200

    Do not reset threshold and alert_on_expire on update.


========================================

 PreludeCorrelator/context.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

========================================

diff --git a/PreludeCorrelator/context.py b/PreludeCorrelator/context.py
index 7813082..94b76d4 100644
--- a/PreludeCorrelator/context.py
+++ b/PreludeCorrelator/context.py
@@ -66,14 +66,14 @@ class Context(idmef.IDMEF, Timer):
                 idmef.IDMEF.__setstate__(self, dict)
 
         def __init__(self, name, options={}, update=False):
-                self._threshold = options.get("threshold", -1)
-                self._alert_on_expire = options.get("alert_on_expire", False)
-
                 if update and _CONTEXT_TABLE.has_key(name):
                         if Timer.running(self):
                                 Timer.reset(self)
                         return
 
+                self._threshold = options.get("threshold", -1)
+                self._alert_on_expire = options.get("alert_on_expire", False)
+
                 self._name = name
                 _CONTEXT_TABLE[name] = self
 
_______________________________________________
Prelude-cvslog site list
[email protected]
http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog