From: Michael Jerris Date: Thu, 14 Sep 2006 23:48:19 +0000 (+0000) Subject: handle no channel gracefully. X-Git-Tag: v1.0-beta1~2130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9efc687d7a1e3ad315bcb981abaee5dd749d083f;p=thirdparty%2Ffreeswitch.git handle no channel gracefully. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2706 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 7f2658b6fb..2dbb7e31fb 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1384,7 +1384,9 @@ static void sip_i_state(int status, return; } } - switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS"); + if (channel) { + switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS"); + } nua_respond(nh, SIP_488_NOT_ACCEPTABLE, //SIPTAG_CONTACT(tech_pvt->contact), TAG_END()); @@ -1419,7 +1421,9 @@ static void sip_i_state(int status, return; } } - switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS"); + if (channel) { + switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS"); + } nua_respond(nh, SIP_488_NOT_ACCEPTABLE, //SIPTAG_CONTACT(tech_pvt->contact), TAG_END()); @@ -1460,7 +1464,9 @@ static void sip_i_state(int status, return; } } - switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS"); + if (channel) { + switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS"); + } nua_respond(nh, SIP_488_NOT_ACCEPTABLE, //SIPTAG_CONTACT(tech_pvt->contact), TAG_END());