From: Anthony Minessale Date: Fri, 16 Jul 2010 15:05:12 +0000 (-0500) Subject: MODSOFIA-83 X-Git-Tag: v1.2-rc1~544^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72be253d2b4fe77e5dd2f8069bd8e75b136d8950;p=thirdparty%2Ffreeswitch.git MODSOFIA-83 --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index ae35a47fb3..f47711ecb1 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -684,6 +684,12 @@ void sofia_event_callback(nua_event_t event, int locked = 0; int check_destroy = 1; + + if (!sofia_test_pflag(profile, PFLAG_RUNNING)) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Profile is shutting down.\n"); + return; + } + /* sofia_private will be == &mod_sofia_globals.keep_private whenever a request is done with a new handle that has to be freed whenever the request is done */ if (nh && sofia_private == &mod_sofia_globals.keep_private) {