提交 a7276cac authored 作者: Anthony Minessale's avatar Anthony Minessale

add timeout to iax read

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8838 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 887df65e
......@@ -574,6 +574,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
{
private_t *tech_pvt = switch_core_session_get_private(session);
switch_byte_t *data;
int ms_count = 0;
switch_assert(tech_pvt != NULL);
tech_pvt->read_frame.flags = SFF_NONE;
......@@ -615,6 +616,9 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
}
switch_yield(1000);
if (++ms_count >= 30000) {
break;
}
}
return SWITCH_STATUS_FALSE;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论