mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 09:58:17 +00:00
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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user