aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-11 17:09:22 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-11 17:09:22 +0000
commit9b5f2194641093ae940c844f351a19e36434d928 (patch)
treec4e8d0dee04a59bb9f10dc6a316ab6ffd9d151cb /main
parentae79862f0e3aca592fa26a0895e0515b966dc93a (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.8@286270 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/file.c b/main/file.c
index 726a72b64..97e3720f1 100644
--- a/main/file.c
+++ b/main/file.c
@@ -651,7 +651,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;