diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-12-09 12:03:09 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-12-09 12:03:45 +0200 |
commit | e82a605b244e836e1d050ea4168a00e30d8906c9 (patch) | |
tree | 131f95cc8a315e1b69155ca8505cc181f99df93a /testing/asterisk/ASTERISK-18994.patch | |
parent | 5da95ade3824aa45275b3457899ba8056b7c198f (diff) | |
download | aports-e82a605b244e836e1d050ea4168a00e30d8906c9.tar.bz2 aports-e82a605b244e836e1d050ea4168a00e30d8906c9.tar.xz |
testing/asterisk: add some bug fixes and patches
Diffstat (limited to 'testing/asterisk/ASTERISK-18994.patch')
-rw-r--r-- | testing/asterisk/ASTERISK-18994.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/asterisk/ASTERISK-18994.patch b/testing/asterisk/ASTERISK-18994.patch new file mode 100644 index 0000000000..702e91375d --- /dev/null +++ b/testing/asterisk/ASTERISK-18994.patch @@ -0,0 +1,28 @@ +--- a/main/file.c.orig 2011-12-09 11:32:05.000000000 +0200 ++++ b/main/file.c 2011-12-09 11:35:22.000000000 +0200 +@@ -1005,6 +1005,7 @@ + struct ast_filestream *fs; + struct ast_filestream *vfs=NULL; + char fmt[256]; ++ off_t pos; + int seekattempt; + int res; + +@@ -1017,12 +1018,14 @@ + /* check to see if there is any data present (not a zero length file), + * 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); ++ pos = ftello(fs->f); ++ seekattempt = fseeko(fs->f, -1, SEEK_END); + if (seekattempt && errno == EINVAL) { + /* Zero-length file, as opposed to a pipe */ + return 0; +- } else { +- ast_seekstream(fs, 0, SEEK_SET); ++ } ++ if (seekattempt == 0) { ++ fseeko(fs->f, pos, SEEK_SET); + } + + vfs = ast_openvstream(chan, filename, preflang); |