From 1a981a085f32834d9470e04802b7a374d80df743 Mon Sep 17 00:00:00 2001 From: Davidson Francis Date: Tue, 23 Jul 2024 22:24:00 -0300 Subject: [PATCH] Bug Fix: Only trigger static events if they're enabled --- events.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/events.c b/events.c index 9a0f3ba..2cb5bd1 100644 --- a/events.c +++ b/events.c @@ -65,6 +65,10 @@ int process_static_event(struct log_event *ev) int handled; for (i = 0, handled = 0; i < NUM_EVENTS; i++) { + /* Skip not enabled events. */ + if (!handlers[i].enabled) + continue; + if (strstr(ev->msg, handlers[i].str)) { handlers[i].hnd(ev, i); handled += 1;