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:
parent
887df65ed7
commit
a7276cac88
|
@ -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);
|
private_t *tech_pvt = switch_core_session_get_private(session);
|
||||||
switch_byte_t *data;
|
switch_byte_t *data;
|
||||||
|
int ms_count = 0;
|
||||||
|
|
||||||
switch_assert(tech_pvt != NULL);
|
switch_assert(tech_pvt != NULL);
|
||||||
tech_pvt->read_frame.flags = SFF_NONE;
|
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);
|
switch_yield(1000);
|
||||||
|
if (++ms_count >= 30000) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
|
|
Loading…
Reference in New Issue