summaryrefslogtreecommitdiff
path: root/channels/console_video.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-03-01 22:09:18 +0000
committerTerry Wilson <twilson@digium.com>2012-03-01 22:09:18 +0000
commit0e5c761c28a4ea091d760cfabc2ed3512ee2689a (patch)
treea9d5d359a27a013ac9e3cdf4162c2f32eea90324 /channels/console_video.c
parente291318df2c7ed5ebbaec059d73271976c792091 (diff)
Opaquify ast_channel typedefs, fd arrays, and softhangup flag
Review: https://reviewboard.asterisk.org/r/1784/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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));
}