mirror of
https://github.com/Theldus/alertik.git
synced 2024-11-22 07:53:08 +01:00
Bug Fix: Only trigger static events if they're enabled
This commit is contained in:
parent
1bac4dc9a2
commit
1a981a085f
4
events.c
4
events.c
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user