diff options
author | Olle Johansson <oej@edvina.net> | 2010-09-11 17:12:58 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2010-09-11 17:12:58 +0000 |
commit | e85f6a3d48e78a011c7a33202f5c3599e5b6ab75 (patch) | |
tree | fd4e05b2615bfb9e9a297084717dcdce35ce0cd3 /main/file.c | |
parent | a6480ff889049598079b7b15e039a30891653fb0 (diff) |
Merged revisions 286270 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r286270 | oej | 2010-09-11 19:09:22 +0200 (Lör, 11 Sep 2010) | 18 lines
Merged revisions 286268 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r286268 | oej | 2010-09-11 19:05:16 +0200 (Lör, 11 Sep 2010) | 11 lines
Merged revisions 286267 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r286267 | oej | 2010-09-11 18:59:20 +0200 (Lör, 11 Sep 2010) | 4 lines
Handle error response when we can't make file compatible
Review: https://reviewboard.asterisk.org/r/911/
........
................
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@286272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/file.c')
-rw-r--r-- | main/file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/file.c b/main/file.c index 3869ea576..4c1414867 100644 --- a/main/file.c +++ b/main/file.c @@ -653,7 +653,10 @@ struct ast_filestream *ast_openstream_full(struct ast_channel *chan, const char chan->oldwriteformat = chan->writeformat; /* Set the channel to a format we can work with */ res = ast_set_write_format(chan, fmts); - res = ast_filehelper(buf, chan, NULL, ACTION_OPEN); + if (res == -1) { /* No format available that works with this channel */ + return NULL; + } + res = ast_filehelper(buf, chan, NULL, ACTION_OPEN); if (res >= 0) return chan->stream; return NULL; |