add timeout to iax read

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8838 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-06-24 22:43:58 +00:00
parent 887df65ed7
commit a7276cac88
1 changed files with 4 additions and 0 deletions

View File

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