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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
certified/1.8.15
Matthew Jordan 13 years ago
parent 139a7459cd
commit f248f6eb71

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -156,7 +156,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;
}

@ -145,7 +145,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;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -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;
}

@ -118,7 +118,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;
}

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

@ -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;
}

@ -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;
}

@ -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;
}

Loading…
Cancel
Save