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
........

Merged revisions 364578 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Jordan 2012-04-29 19:50:57 +00:00
parent 2cbcbc7f6b
commit 60d9ca687c
14 changed files with 15 additions and 15 deletions

View File

@ -122,7 +122,7 @@ static int g719trunc(struct ast_filestream *fs)
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;
}

View File

@ -125,7 +125,7 @@ static int g723_trunc(struct ast_filestream *fs)
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;
}

View File

@ -120,7 +120,7 @@ static int g729_trunc(struct ast_filestream *fs)
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;
}

View File

@ -160,7 +160,7 @@ static int gsm_trunc(struct ast_filestream *fs)
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;
}

View File

@ -153,7 +153,7 @@ static int h263_trunc(struct ast_filestream *fs)
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;
}

View File

@ -146,7 +146,7 @@ static int h264_trunc(struct ast_filestream *fs)
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;
}

View File

@ -118,7 +118,7 @@ static int ilbc_trunc(struct ast_filestream *fs)
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;
}

View File

@ -168,7 +168,7 @@ static int pcm_trunc(struct ast_filestream *fs)
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 @@ static int au_trunc(struct ast_filestream *fs)
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;
}

View File

@ -122,7 +122,7 @@ static int siren14trunc(struct ast_filestream *fs)
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;
}

View File

@ -122,7 +122,7 @@ static int siren7trunc(struct ast_filestream *fs)
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;
}

View File

@ -114,7 +114,7 @@ static int slinear_trunc(struct ast_filestream *fs)
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;
}

View File

@ -120,7 +120,7 @@ static int vox_trunc(struct ast_filestream *fs)
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;
}

View File

@ -496,7 +496,7 @@ static int wav_trunc(struct ast_filestream *fs)
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;
}

View File

@ -530,7 +530,7 @@ static int wav_trunc(struct ast_filestream *fs)
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;
}