summaryrefslogtreecommitdiff
path: root/channels/console_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/console_video.c')
-rw-r--r--channels/console_video.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/channels/console_video.c b/channels/console_video.c
index db07fccee..d53e6ec27 100644
--- a/channels/console_video.c
+++ b/channels/console_video.c
@@ -972,7 +972,6 @@ static void *video_thread(void *arg)
}
continue;
}
- fd = chan->alertpipe[1];
ast_channel_lock(chan);
/* AST_LIST_INSERT_TAIL is only good for one frame, cannot use here */
@@ -986,10 +985,9 @@ static void *video_thread(void *arg)
* more or less same as ast_queue_frame, but extra
* write on the alertpipe to signal frames.
*/
- if (fd > -1) {
- int blah = 1, l = sizeof(blah);
+ if (ast_channel_alertable(chan)) {
for (p = f; p; p = AST_LIST_NEXT(p, frame_list)) {
- if (write(fd, &blah, l) != l)
+ if (ast_channel_alert(chan)) {
ast_log(LOG_WARNING, "Unable to write to alert pipe on %s, frametype/subclass %d/%d: %s!\n",
ast_channel_name(chan), f->frametype, f->subclass, strerror(errno));
}