aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-11 16:59:20 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-11 16:59:20 +0000
commit4f8c104bdabd24e97bad179a3e9d3563e2187376 (patch)
treea0f582db9362a5ab44ee7054c27e1bd4fc11f397 /main
parent97a32380a70c05c453a3d3f50c9acb356b3c534e (diff)
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.4@286267 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 f576c853b..abb7943d4 100644
--- a/main/file.c
+++ b/main/file.c
@@ -668,7 +668,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;