From 0ae977a1ca25c9036e6e40c23acd1339cc8ace52 Mon Sep 17 00:00:00 2001 From: Davidson Francis Date: Tue, 24 Sep 2024 21:04:10 -0300 Subject: [PATCH] Bug Fix: Properly initialize static and env events --- alertik.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/alertik.c b/alertik.c index 76f81fb..13800dd 100644 --- a/alertik.c +++ b/alertik.c @@ -46,6 +46,7 @@ static void *handle_messages(void *p) int main(void) { pthread_t handler; + int ret; int fd; log_init(); @@ -55,7 +56,9 @@ int main(void) log_msg(" (https://github.com/Theldus/alertik)\n"); log_msg("-------------------------------------------------\n"); - if (!init_static_events() && !init_environment_events()) + ret = init_static_events(); + ret += init_environment_events(); + if (!ret) panic("No event was configured, please configure at least one\n" "before proceeding!\n");