Use ast_seekstream to return the file stream back to the beginning instead of directl...
authorJoshua Colp <jcolp@digium.com>
Mon, 15 Dec 2008 17:24:28 +0000 (17:24 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 15 Dec 2008 17:24:28 +0000 (17:24 +0000)
(closes issue #14079)
Reported by: elguero

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164312 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/file.c

index b2ebfd7..5e920cc 100644 (file)
@@ -911,7 +911,7 @@ int ast_streamfile(struct ast_channel *chan, const char *filename, const char *p
         * return the file had no data. */
        seekattempt = fseek(fs->f, -1, SEEK_END);
        if (!seekattempt)
-               fseek(fs->f, 0, SEEK_SET);
+               ast_seekstream(fs, 0, SEEK_SET);
        else
                return 0;