handle no channel gracefully.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2706 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-09-14 23:48:19 +00:00
parent 9a91102fe0
commit 9efc687d7a
1 changed files with 9 additions and 3 deletions

View File

@ -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());