mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 03:18:30 +00:00
Merge "channel.c: Fix unbalanced read queue deadlocking local channels." into 14
This commit is contained in:
@@ -1150,6 +1150,9 @@ static int __ast_queue_frame(struct ast_channel *chan, struct ast_frame *fin, in
|
||||
}
|
||||
AST_LIST_REMOVE_CURRENT(frame_list);
|
||||
ast_frfree(cur);
|
||||
|
||||
/* Read from the alert pipe for each flushed frame. */
|
||||
ast_channel_internal_alert_read(chan);
|
||||
}
|
||||
}
|
||||
AST_LIST_TRAVERSE_SAFE_END;
|
||||
@@ -1166,9 +1169,13 @@ static int __ast_queue_frame(struct ast_channel *chan, struct ast_frame *fin, in
|
||||
}
|
||||
|
||||
if (ast_channel_alert_writable(chan)) {
|
||||
if (ast_channel_alert_write(chan)) {
|
||||
ast_log(LOG_WARNING, "Unable to write to alert pipe on %s (qlen = %u): %s!\n",
|
||||
ast_channel_name(chan), queued_frames, strerror(errno));
|
||||
/* Write to the alert pipe for each added frame */
|
||||
while (new_frames--) {
|
||||
if (ast_channel_alert_write(chan)) {
|
||||
ast_log(LOG_WARNING, "Unable to write to alert pipe on %s (qlen = %u): %s!\n",
|
||||
ast_channel_name(chan), queued_frames, strerror(errno));
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (ast_channel_timingfd(chan) > -1) {
|
||||
ast_timer_enable_continuous(ast_channel_timer(chan));
|
||||
|
||||
Reference in New Issue
Block a user