git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@881 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2006-03-21 00:20:24 +00:00
1 parent a688382c3c
commit bc69b89cf9
4 files changed
+39 -3

No files matched your search

+11
View File
@@ -592,6 +592,8 @@ static switch_status channel_read_frame(switch_core_session *session, switch_fra
{
switch_channel *channel = NULL;
struct private_object *tech_pvt = NULL;
switch_time_t started = switch_time_now();
unsigned int elapsed;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -615,6 +617,15 @@ static switch_status channel_read_frame(switch_core_session *session, switch_fra
*frame = &tech_pvt->read_frame;
return SWITCH_STATUS_SUCCESS;
}
if (timeout > -1) {
elapsed = (unsigned int)((switch_time_now() - started) / 1000);
if (elapsed >= timeout) {
return SWITCH_STATUS_SUCCESS;
}
}
switch_yield(1000);
}