diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-02 18:52:13 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-02 18:52:13 +0000 |
commit | cc1b2c100fc6dd44a690652ecd3c5788b0438ea7 (patch) | |
tree | a3750d996d41e35c5df34c29533dd7d9fdcaff24 /main/channel.c | |
parent | 2d6e969e7c81afb0b050691b85f2bc74ca84ae62 (diff) |
bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/main/channel.c b/main/channel.c index 6ace4c008..4174613ec 100644 --- a/main/channel.c +++ b/main/channel.c @@ -2272,8 +2272,11 @@ int ast_waitfordigit_full(struct ast_channel *c, int ms, int audiofd, int cmdfd) break; case AST_FRAME_VOICE: /* Write audio if appropriate */ - if (audiofd > -1) - write(audiofd, f->data.ptr, f->datalen); + if (audiofd > -1) { + if (write(audiofd, f->data.ptr, f->datalen) < 0) { + ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno)); + } + } default: /* Ignore */ break; @@ -2420,7 +2423,9 @@ static struct ast_frame *__ast_read(struct ast_channel *chan, int dropaudio) goto done; } } - read(chan->alertpipe[0], &blah, sizeof(blah)); + if (read(chan->alertpipe[0], &blah, sizeof(blah)) < 0) { + ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno)); + } } if (chan->timingfd > -1 && chan->fdno == AST_TIMING_FD) { @@ -3887,7 +3892,10 @@ int ast_do_masquerade(struct ast_channel *original) AST_LIST_INSERT_TAIL(&original->readq, current, frame_list); if (original->alertpipe[1] > -1) { int poke = 0; - write(original->alertpipe[1], &poke, sizeof(poke)); + + if (write(original->alertpipe[1], &poke, sizeof(poke)) < 0) { + ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno)); + } } } } |