From: Travis Cross Date: Fri, 27 Jun 2014 22:14:14 +0000 (+0000) Subject: Allow reincarnation from mod_sofia's shutdown-on-fail X-Git-Tag: v1.5.13~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52fb53cba41cada08cb2e8ee15f4de7a44943535;p=thirdparty%2Ffreeswitch.git Allow reincarnation from mod_sofia's shutdown-on-fail mod_sofia's parameter shutdown-on-fail now accepts the value "reincarnate-now". This will cause the switch to exit immediately with a non-zero exit code so that the supervisor can recover the switch. For this to work you have to pass in -reincarnate or -reincarnate-reexec to freeswitch. --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index b2019041ed..f53149f3fd 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -2478,6 +2478,9 @@ static void sofia_perform_profile_start_failure(sofia_profile_t *profile, char * } else if (!strcasecmp(profile->shutdown_type, "asap")) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Profile %s could not load! Shutting down ASAP!\n", profile->name); switch_core_session_ctl(SCSC_SHUTDOWN_ASAP, &arg); + } else if (!strcasecmp(profile->shutdown_type, "reincarnate-now")) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Profile %s could not load! Asking for reincarnation now!\n", profile->name); + switch_core_session_ctl(SCSC_REINCARNATE_NOW, &arg); } }