mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	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/branches/1.8@290576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -959,10 +959,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 | 	 * done this way because there is no where for ast_openstream_full to | ||||||
| 	 * return the file had no data. */ | 	 * return the file had no data. */ | ||||||
| 	seekattempt = fseek(fs->f, -1, SEEK_END); | 	seekattempt = fseek(fs->f, -1, SEEK_END); | ||||||
| 	if (!seekattempt) | 	if (seekattempt && errno == EINVAL) { | ||||||
| 		ast_seekstream(fs, 0, SEEK_SET); | 		/* Zero-length file, as opposed to a pipe */ | ||||||
| 	else |  | ||||||
| 		return 0; | 		return 0; | ||||||
|  | 	} else { | ||||||
|  | 		ast_seekstream(fs, 0, SEEK_SET); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	vfs = ast_openvstream(chan, filename, preflang); | 	vfs = ast_openvstream(chan, filename, preflang); | ||||||
| 	if (vfs) { | 	if (vfs) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user