Bug Fix: Properly initialize static and env events

This commit is contained in:
Davidson Francis 2024-09-24 21:04:10 -03:00
parent cf9a9279c2
commit 0ae977a1ca

View File

@ -46,6 +46,7 @@ static void *handle_messages(void *p)
int main(void) int main(void)
{ {
pthread_t handler; pthread_t handler;
int ret;
int fd; int fd;
log_init(); log_init();
@ -55,7 +56,9 @@ int main(void)
log_msg(" (https://github.com/Theldus/alertik)\n"); log_msg(" (https://github.com/Theldus/alertik)\n");
log_msg("-------------------------------------------------\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" panic("No event was configured, please configure at least one\n"
"before proceeding!\n"); "before proceeding!\n");