FS-4079 possible fix

This commit is contained in:
Anthony Minessale 2012-06-11 11:13:19 -05:00
parent b735735ea1
commit 56325e8c71

View File

@ -2339,6 +2339,19 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
break;
case SWITCH_MESSAGE_INDICATE_RESPOND:
{
int status = 0;
if (tech_pvt->nh && tech_pvt->nh->nh_ds && tech_pvt->nh->nh_ds->ds_sr && nua_server_request_is_pending(tech_pvt->nh->nh_ds->ds_sr)) {
status = tech_pvt->nh->nh_ds->ds_sr->sr_status;
}
if (status == 0 || status > 199 || tech_pvt->nh->nh_destroyed) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "%s Cannot call respond on handle at status %d\n",
switch_channel_get_name(channel), status);
goto end_lock;
}
if (msg->numeric_arg || msg->string_arg) {
int code = msg->numeric_arg;
const char *reason = NULL;
@ -2485,6 +2498,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
}
}
}
break;
case SWITCH_MESSAGE_INDICATE_RINGING:
{