add timout to record and time tables to all the channel events

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5236 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-05-31 14:42:23 +00:00
parent 1730f202dd
commit a1d4140ce6
9 changed files with 55 additions and 14 deletions

View File

@@ -232,7 +232,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
switch_mutex_lock(bp->read_mutex);
switch_buffer_write(bp->raw_read_buffer, read_frame->data, read_frame->datalen);
if (bp->callback) {
if (bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_READ) == SWITCH_FALSE) {
if (bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_READ) == SWITCH_FALSE || (bp->stop_time && bp->stop_time >= time(NULL))) {
bp->ready = 0;
if (last) {
last->next = bp->next;
@@ -505,6 +505,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
}
}
if (bp->stop_time && bp->stop_time >= time(NULL)) {
ok = SWITCH_FALSE;
}
if (ok == SWITCH_FALSE) {
bp->ready = 0;
if (last) {