Skip to content

Commit

Permalink
Throw startup error if event_route can never be run
Browse files Browse the repository at this point in the history
OpenSIPS would start without any error or warning if an event_route
is used but the 'event_route' module is not loaded.

(cherry picked from commit bb9bd92)
  • Loading branch information
rvlad-patrascu committed Aug 26, 2022
1 parent c6cc088 commit 9d41bfc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions route.c
Expand Up @@ -1475,6 +1475,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;
}
Expand Down

0 comments on commit 9d41bfc

Please sign in to comment.