Module: kamailio
Branch: master
Commit: 03aa6556ef59c0b274c78f2edc2231c6d2ed333b
URL:
https://github.com/kamailio/kamailio/commit/03aa6556ef59c0b274c78f2edc2231c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-11-21T13:41:38+01:00
core: main - executes callbacks on app ready and shutdown
---
Modified: src/main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/03aa6556ef59c0b274c78f2edc2231c…
Patch:
https://github.com/kamailio/kamailio/commit/03aa6556ef59c0b274c78f2edc2231c…
---
diff --git a/src/main.c b/src/main.c
index c8ee3ad115..a5a0070537 100644
--- a/src/main.c
+++ b/src/main.c
@@ -684,6 +684,8 @@ static void sig_alarm_abort(int signo)
static void shutdown_children(int sig, int show_status)
{
+ sr_corecb_void_exec(app_shutdown);
+
kill_all_children(sig);
if (set_sig_h(SIGALRM, sig_alarm_kill) == SIG_ERR ) {
LM_ERR("could not install SIGALARM handler\n");
@@ -1788,6 +1790,7 @@ int main_loop(void)
cfg_ok=1;
*_sr_instance_started = 1;
+ sr_corecb_void_exec(app_ready);
#ifdef EXTRA_DEBUG
for (r=0; r<*process_count; r++){