[asterisk-commits] russell: branch 1.4 r203785 - /branches/1.4/main/file.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jun 26 16:16:44 CDT 2009
Author: russell
Date: Fri Jun 26 16:16:39 2009
New Revision: 203785
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=203785
Log:
Don't fast forward past the end of a message.
This is nice change for users of the voicemail application. If someone gets a
little carried away with fast forwarding through a message, they can easily
get to the end and accidentally exit the voicemail application by hitting the
fast forward key during the following prompt.
This adds some safety by not allowing a fast forward past the end of a message.
(closes issue #14554)
Reported by: lacoursj
Patches:
21761.patch uploaded by lacoursj (license 707)
Tested by: lacoursj
Modified:
branches/1.4/main/file.c
Modified: branches/1.4/main/file.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/main/file.c?view=diff&rev=203785&r1=203784&r2=203785
==============================================================================
--- branches/1.4/main/file.c (original)
+++ branches/1.4/main/file.c Fri Jun 26 16:16:39 2009
@@ -1236,7 +1236,14 @@
} else {
res = fr->subclass;
if (strchr(forward,res)) {
+ int eoftest;
ast_stream_fastforward(c->stream, skip_ms);
+ eoftest = fgetc(c->stream->f);
+ if (feof(c->stream->f)) {
+ ast_stream_rewind(c->stream, skip_ms);
+ } else {
+ ungetc(eoftest, c->stream->f);
+ }
} else if (strchr(rewind,res)) {
ast_stream_rewind(c->stream, skip_ms);
} else if (strchr(breakon, res)) {
More information about the asterisk-commits
mailing list