Bug Fix: Only trigger static events if they're enabled

This commit is contained in:
Davidson Francis 2024-07-23 22:24:00 -03:00
parent 1bac4dc9a2
commit 1a981a085f

View File

@ -65,6 +65,10 @@ int process_static_event(struct log_event *ev)
int handled; int handled;
for (i = 0, handled = 0; i < NUM_EVENTS; i++) { 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)) { if (strstr(ev->msg, handlers[i].str)) {
handlers[i].hnd(ev, i); handlers[i].hnd(ev, i);
handled += 1; handled += 1;