[asterisk-commits] mjordan: trunk r362306 - in /trunk: ./ formats/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 17 13:29:54 CDT 2012


Author: mjordan
Date: Tue Apr 17 13:29:51 2012
New Revision: 362306

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=362306
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
........

Merged revisions 362305 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    trunk/   (props changed)
    trunk/formats/format_g719.c
    trunk/formats/format_gsm.c
    trunk/formats/format_pcm.c
    trunk/formats/format_siren14.c
    trunk/formats/format_siren7.c
    trunk/formats/format_sln.c
    trunk/formats/format_vox.c
    trunk/formats/format_wav.c
    trunk/formats/format_wav_gsm.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/formats/format_g719.c
URL: http://svnview.digium.com/svn/asterisk/trunk/formats/format_g719.c?view=diff&rev=362306&r1=362305&r2=362306
==============================================================================
--- trunk/formats/format_g719.c (original)
+++ trunk/formats/format_g719.c Tue Apr 17 13:29:51 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: trunk/formats/format_gsm.c
URL: http://svnview.digium.com/svn/asterisk/trunk/formats/format_gsm.c?view=diff&rev=362306&r1=362305&r2=362306
==============================================================================
--- trunk/formats/format_gsm.c (original)
+++ trunk/formats/format_gsm.c Tue Apr 17 13:29:51 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: trunk/formats/format_pcm.c
URL: http://svnview.digium.com/svn/asterisk/trunk/formats/format_pcm.c?view=diff&rev=362306&r1=362305&r2=362306
==============================================================================
--- trunk/formats/format_pcm.c (original)
+++ trunk/formats/format_pcm.c Tue Apr 17 13:29:51 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: trunk/formats/format_siren14.c
URL: http://svnview.digium.com/svn/asterisk/trunk/formats/format_siren14.c?view=diff&rev=362306&r1=362305&r2=362306
==============================================================================
--- trunk/formats/format_siren14.c (original)
+++ trunk/formats/format_siren14.c Tue Apr 17 13:29:51 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: trunk/formats/format_siren7.c
URL: http://svnview.digium.com/svn/asterisk/trunk/formats/format_siren7.c?view=diff&rev=362306&r1=362305&r2=362306
==============================================================================
--- trunk/formats/format_siren7.c (original)
+++ trunk/formats/format_siren7.c Tue Apr 17 13:29:51 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: trunk/formats/format_sln.c
URL: http://svnview.digium.com/svn/asterisk/trunk/formats/format_sln.c?view=diff&rev=362306&r1=362305&r2=362306
==============================================================================
--- trunk/formats/format_sln.c (original)
+++ trunk/formats/format_sln.c Tue Apr 17 13:29:51 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: trunk/formats/format_vox.c
URL: http://svnview.digium.com/svn/asterisk/trunk/formats/format_vox.c?view=diff&rev=362306&r1=362305&r2=362306
==============================================================================
--- trunk/formats/format_vox.c (original)
+++ trunk/formats/format_vox.c Tue Apr 17 13:29:51 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: trunk/formats/format_wav.c
URL: http://svnview.digium.com/svn/asterisk/trunk/formats/format_wav.c?view=diff&rev=362306&r1=362305&r2=362306
==============================================================================
--- trunk/formats/format_wav.c (original)
+++ trunk/formats/format_wav.c Tue Apr 17 13:29:51 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: trunk/formats/format_wav_gsm.c
URL: http://svnview.digium.com/svn/asterisk/trunk/formats/format_wav_gsm.c?view=diff&rev=362306&r1=362305&r2=362306
==============================================================================
--- trunk/formats/format_wav_gsm.c (original)
+++ trunk/formats/format_wav_gsm.c Tue Apr 17 13:29:51 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