aboutsummaryrefslogtreecommitdiffstats
path: root/main/file.c
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-11 17:05:16 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-11 17:05:16 +0000
commitdc357c4d46c4e194e8982c60d81147be4006e6ce (patch)
tree899a6d6cb4d57653a8bcf9cd161a5f7fa7f110df /main/file.c
parent9bf8735747803a140a7371a8b4126323d7685a16 (diff)
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.6.2@286268 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/file.c')
-rw-r--r--main/file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/file.c b/main/file.c
index 98c0f208c..ae67f8bc9 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;