[asterisk-commits] mjordan: branch 1.8 r364578 - /branches/1.8/formats/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Apr 29 14:32:02 CDT 2012


Author: mjordan
Date: Sun Apr 29 14:31:55 2012
New Revision: 364578

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=364578
Log:
Fix error that caused truncate operations to fail

Another very inappropriate placement of a ')' (again introduced in r362151)
caused the various truncate operations to attempt to truncate the sound file
at a position of '0'.

(issue ASTERISK-19655)
Reported by: Matt Jordan

(issue ASTERISK-19810)
Reported by: colbec

Modified:
    branches/1.8/formats/format_g719.c
    branches/1.8/formats/format_g723.c
    branches/1.8/formats/format_g729.c
    branches/1.8/formats/format_gsm.c
    branches/1.8/formats/format_h263.c
    branches/1.8/formats/format_h264.c
    branches/1.8/formats/format_ilbc.c
    branches/1.8/formats/format_pcm.c
    branches/1.8/formats/format_siren14.c
    branches/1.8/formats/format_siren7.c
    branches/1.8/formats/format_sln.c
    branches/1.8/formats/format_sln16.c
    branches/1.8/formats/format_vox.c
    branches/1.8/formats/format_wav.c
    branches/1.8/formats/format_wav_gsm.c

Modified: branches/1.8/formats/format_g719.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_g719.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_g719.c (original)
+++ branches/1.8/formats/format_g719.c Sun Apr 29 14:31:55 2012
@@ -122,7 +122,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for g719 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in g719 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_g723.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_g723.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_g723.c (original)
+++ branches/1.8/formats/format_g723.c Sun Apr 29 14:31:55 2012
@@ -125,7 +125,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for g723 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in g723 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_g729.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_g729.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_g729.c (original)
+++ branches/1.8/formats/format_g729.c Sun Apr 29 14:31:55 2012
@@ -120,7 +120,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for g729 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in g729 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_gsm.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_gsm.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_gsm.c (original)
+++ branches/1.8/formats/format_gsm.c Sun Apr 29 14:31:55 2012
@@ -160,7 +160,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for gsm filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in gsm filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_h263.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_h263.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_h263.c (original)
+++ branches/1.8/formats/format_h263.c Sun Apr 29 14:31:55 2012
@@ -156,7 +156,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for h263 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in h263 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_h264.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_h264.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_h264.c (original)
+++ branches/1.8/formats/format_h264.c Sun Apr 29 14:31:55 2012
@@ -145,7 +145,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for h264 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in h264 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_ilbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_ilbc.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_ilbc.c (original)
+++ branches/1.8/formats/format_ilbc.c Sun Apr 29 14:31:55 2012
@@ -118,7 +118,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for iLBC filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in iLBC filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_pcm.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_pcm.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_pcm.c (original)
+++ branches/1.8/formats/format_pcm.c Sun Apr 29 14:31:55 2012
@@ -168,7 +168,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for pcm filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in pcm filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
@@ -445,7 +445,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for au filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in au filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_siren14.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_siren14.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_siren14.c (original)
+++ branches/1.8/formats/format_siren14.c Sun Apr 29 14:31:55 2012
@@ -122,7 +122,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for siren14 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in siren14 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_siren7.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_siren7.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_siren7.c (original)
+++ branches/1.8/formats/format_siren7.c Sun Apr 29 14:31:55 2012
@@ -122,7 +122,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for siren7 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in siren7 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_sln.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_sln.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_sln.c (original)
+++ branches/1.8/formats/format_sln.c Sun Apr 29 14:31:55 2012
@@ -118,7 +118,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for sln filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in sln filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_sln16.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_sln16.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_sln16.c (original)
+++ branches/1.8/formats/format_sln16.c Sun Apr 29 14:31:55 2012
@@ -122,7 +122,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for sln16 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in sln16 filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_vox.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_vox.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_vox.c (original)
+++ branches/1.8/formats/format_vox.c Sun Apr 29 14:31:55 2012
@@ -120,7 +120,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for vox filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in vox filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_wav.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_wav.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_wav.c (original)
+++ branches/1.8/formats/format_wav.c Sun Apr 29 14:31:55 2012
@@ -496,7 +496,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for wav filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in wav filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}

Modified: branches/1.8/formats/format_wav_gsm.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/formats/format_wav_gsm.c?view=diff&rev=364578&r1=364577&r2=364578
==============================================================================
--- branches/1.8/formats/format_wav_gsm.c (original)
+++ branches/1.8/formats/format_wav_gsm.c Sun Apr 29 14:31:55 2012
@@ -530,7 +530,7 @@
 		ast_log(AST_LOG_WARNING, "Unable to determine file descriptor for WAV filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}
-	if ((cur = ftello(fs->f) < 0)) {
+	if ((cur = ftello(fs->f)) < 0) {
 		ast_log(AST_LOG_WARNING, "Unable to determine current position in WAV filestream %p: %s\n", fs, strerror(errno));
 		return -1;
 	}




More information about the asterisk-commits mailing list