From bb9bd920feb712cf8ec0c32d4e418056fae8cc81 Mon Sep 17 00:00:00 2001 From: Vlad Patrascu Date: Fri, 26 Aug 2022 19:49:22 +0300 Subject: [PATCH] Throw startup error if event_route can never be run OpenSIPS would start without any error or warning if an event_route is used but the 'event_route' module is not loaded. --- route.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/route.c b/route.c index 451a67d588d..98796488970 100644 --- a/route.c +++ b/route.c @@ -1492,6 +1492,12 @@ int fix_rls(void) } } + for(i = 1; i< EVENT_RT_NO; i++) + if (sroutes->event[i].a && !module_loaded("event_route")) { + LM_ERR("event_route used but 'event_route' module not loaded!\n"); + return E_CFG; + } + return 0; }