prelude-correlator/master: Make it possible for plugin to specify a function to be called on expire.
[email protected] Fri, 18 Dec 2009 16:58:30 +0100 (CET)
| Newsgroups | gmane.comp.security.ids.prelude.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit d0cf6f5de42fae009c78bf6d56483676d08af6a7 Author: Yoann Vandoorselaere <[email protected]> Date: Wed Nov 4 15:01:26 2009 +0100 Make it possible for plugin to specify a function to be called on expire. ======================================== PreludeCorrelator/context.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) ======================================== diff --git a/PreludeCorrelator/context.py b/PreludeCorrelator/context.py index 2f21d40..ebb63c9 100644 --- a/PreludeCorrelator/context.py +++ b/PreludeCorrelator/context.py @@ -112,7 +112,10 @@ class Context(idmef.IDMEF, Timer): def _timerExpireCallback(self): if self._alert_on_expire: - self.alert() + if callable(self._alert_on_expire): + self._alert_on_expire(self) + else: + self.alert() self.destroy() _______________________________________________ Prelude-cvslog site list [email protected] http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog