diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-10-06 13:50:33 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-10-06 13:50:33 +0000 |
commit | 45432d77b0e0fc91292ec3df8c1e700fbcac9fd6 (patch) | |
tree | ecf63b834e18218222a1bfea601d8364d74fe3da | |
parent | feea367f89756ebdd931f4c9ff97f3a9cf355aeb (diff) |
Merged revisions 290576 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r290576 | tilghman | 2010-10-06 08:49:19 -0500 (Wed, 06 Oct 2010) | 15 lines
Merged revisions 290575 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
........
r290575 | tilghman | 2010-10-06 08:48:27 -0500 (Wed, 06 Oct 2010) | 8 lines
Allow streaming audio from a pipe.
(closes issue #18001)
Reported by: jamicque
Patches:
20100926__issue18001.diff.txt uploaded by tilghman (license 14)
Tested by: jamicque
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | main/file.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/file.c b/main/file.c index 4c1414867..2f6cb3140 100644 --- a/main/file.c +++ b/main/file.c @@ -961,10 +961,12 @@ int ast_streamfile(struct ast_channel *chan, const char *filename, const char *p * done this way because there is no where for ast_openstream_full to * return the file had no data. */ seekattempt = fseek(fs->f, -1, SEEK_END); - if (!seekattempt) - ast_seekstream(fs, 0, SEEK_SET); - else + if (seekattempt && errno == EINVAL) { + /* Zero-length file, as opposed to a pipe */ return 0; + } else { + ast_seekstream(fs, 0, SEEK_SET); + } vfs = ast_openvstream(chan, filename, preflang); if (vfs) { |