[asterisk-commits] mjordan: branch 10 r362305 - in /branches/10: ./ formats/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 17 13:27:47 CDT 2012
Author: mjordan
Date: Tue Apr 17 13:27:44 2012
New Revision: 362305
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=362305
Log:
Fix error that caused seek format operations to set max file size to '1' or '0'
A very inappropriate placement of a ')' (introduced in r362151) caused the
maximum size of a file to be set as the result of a comparison operation, as
opposed to the result of the ftello operation. This resulted in seeking being
restricted to the beginning of the file, or 1 byte into the file. Thanks to
the Asterisk Test Suite for properly freaking out about this on at least one
test.
(issue ASTERISK-19655)
Reported by: Matt Jordan
........
Merged revisions 362304 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/10/ (props changed)
branches/10/formats/format_g719.c
branches/10/formats/format_gsm.c
branches/10/formats/format_pcm.c
branches/10/formats/format_siren14.c
branches/10/formats/format_siren7.c
branches/10/formats/format_sln.c
branches/10/formats/format_vox.c
branches/10/formats/format_wav.c
branches/10/formats/format_wav_gsm.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/formats/format_g719.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/formats/format_g719.c?view=diff&rev=362305&r1=362304&r2=362305
==============================================================================
--- branches/10/formats/format_g719.c (original)
+++ branches/10/formats/format_g719.c Tue Apr 17 13:27:44 2012
@@ -92,7 +92,7 @@
return -1;
}
- if ((max = ftello(fs->f) < 0)) {
+ if ((max = ftello(fs->f)) < 0) {
ast_log(AST_LOG_WARNING, "Unable to determine max position in g719 filestream %p: %s\n", fs, strerror(errno));
return -1;
}
Modified: branches/10/formats/format_gsm.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/formats/format_gsm.c?view=diff&rev=362305&r1=362304&r2=362305
==============================================================================
--- branches/10/formats/format_gsm.c (original)
+++ branches/10/formats/format_gsm.c Tue Apr 17 13:27:44 2012
@@ -120,7 +120,7 @@
return -1;
}
- if ((max = ftello(fs->f) < 0)) {
+ if ((max = ftello(fs->f)) < 0) {
ast_log(AST_LOG_WARNING, "Unable to determine max position in g719 filestream %p: %s\n", fs, strerror(errno));
return -1;
}
Modified: branches/10/formats/format_pcm.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/formats/format_pcm.c?view=diff&rev=362305&r1=362304&r2=362305
==============================================================================
--- branches/10/formats/format_pcm.c (original)
+++ branches/10/formats/format_pcm.c Tue Apr 17 13:27:44 2012
@@ -115,7 +115,7 @@
return -1;
}
- if ((max = ftello(fs->f) < 0)) {
+ if ((max = ftello(fs->f)) < 0) {
ast_log(AST_LOG_WARNING, "Unable to determine max position in pcm filestream %p: %s\n", fs, strerror(errno));
return -1;
}
@@ -414,7 +414,7 @@
return -1;
}
- if ((max = ftello(fs->f) < 0)) {
+ if ((max = ftello(fs->f)) < 0) {
ast_log(AST_LOG_WARNING, "Unable to determine max position in au filestream %p: %s\n", fs, strerror(errno));
return -1;
}
Modified: branches/10/formats/format_siren14.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/formats/format_siren14.c?view=diff&rev=362305&r1=362304&r2=362305
==============================================================================
--- branches/10/formats/format_siren14.c (original)
+++ branches/10/formats/format_siren14.c Tue Apr 17 13:27:44 2012
@@ -92,7 +92,7 @@
return -1;
}
- if ((max = ftello(fs->f) < 0)) {
+ if ((max = ftello(fs->f)) < 0) {
ast_log(AST_LOG_WARNING, "Unable to determine max position in siren14 filestream %p: %s\n", fs, strerror(errno));
return -1;
}
Modified: branches/10/formats/format_siren7.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/formats/format_siren7.c?view=diff&rev=362305&r1=362304&r2=362305
==============================================================================
--- branches/10/formats/format_siren7.c (original)
+++ branches/10/formats/format_siren7.c Tue Apr 17 13:27:44 2012
@@ -92,7 +92,7 @@
return -1;
}
- if ((max = ftello(fs->f) < 0)) {
+ if ((max = ftello(fs->f)) < 0) {
ast_log(AST_LOG_WARNING, "Unable to determine max position in siren7 filestream %p: %s\n", fs, strerror(errno));
return -1;
}
Modified: branches/10/formats/format_sln.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/formats/format_sln.c?view=diff&rev=362305&r1=362304&r2=362305
==============================================================================
--- branches/10/formats/format_sln.c (original)
+++ branches/10/formats/format_sln.c Tue Apr 17 13:27:44 2012
@@ -86,7 +86,7 @@
return -1;
}
- if ((max = ftello(fs->f) < 0)) {
+ if ((max = ftello(fs->f)) < 0) {
ast_log(AST_LOG_WARNING, "Unable to determine max position in sln filestream %p: %s\n", fs, strerror(errno));
return -1;
}
Modified: branches/10/formats/format_vox.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/formats/format_vox.c?view=diff&rev=362305&r1=362304&r2=362305
==============================================================================
--- branches/10/formats/format_vox.c (original)
+++ branches/10/formats/format_vox.c Tue Apr 17 13:27:44 2012
@@ -90,7 +90,7 @@
return -1;
}
- if ((max = ftello(fs->f) < 0)) {
+ if ((max = ftello(fs->f)) < 0) {
ast_log(AST_LOG_WARNING, "Unable to determine max position in g719 filestream %p: %s\n", fs, strerror(errno));
return -1;
}
Modified: branches/10/formats/format_wav.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/formats/format_wav.c?view=diff&rev=362305&r1=362304&r2=362305
==============================================================================
--- branches/10/formats/format_wav.c (original)
+++ branches/10/formats/format_wav.c Tue Apr 17 13:27:44 2012
@@ -468,7 +468,7 @@
return -1;
}
- if ((max = ftello(fs->f) < 0)) {
+ if ((max = ftello(fs->f)) < 0) {
ast_log(AST_LOG_WARNING, "Unable to determine max position in wav filestream %p: %s\n", fs, strerror(errno));
return -1;
}
Modified: branches/10/formats/format_wav_gsm.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/formats/format_wav_gsm.c?view=diff&rev=362305&r1=362304&r2=362305
==============================================================================
--- branches/10/formats/format_wav_gsm.c (original)
+++ branches/10/formats/format_wav_gsm.c Tue Apr 17 13:27:44 2012
@@ -489,7 +489,7 @@
}
/* XXX ideally, should round correctly */
- if ((max = ftello(fs->f) < 0)) {
+ if ((max = ftello(fs->f)) < 0) {
ast_log(AST_LOG_WARNING, "Unable to determine max position in WAV filestream %p: %s\n", fs, strerror(errno));
return -1;
}
More information about the asterisk-commits
mailing list