mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
cleanup: Change severity of fread short-read warning
Many sound files don't have a full frame's worth of data at EOF, so the warning messages were a bit too noisy. So we demote them to debug messages. Change-Id: I6b617467d687658adca39170a81797a11cc766f6
This commit is contained in:
@@ -49,9 +49,9 @@ static struct ast_frame *g719read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -69,9 +69,9 @@ static struct ast_frame *g723_read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -128,9 +128,9 @@ static struct ast_frame *g726_read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -55,9 +55,9 @@ static struct ast_frame *g729_read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -61,9 +61,9 @@ static struct ast_frame *gsm_read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, GSM_FRAME_SIZE, s->f)) != GSM_FRAME_SIZE) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), GSM_FRAME_SIZE, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), GSM_FRAME_SIZE, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -89,9 +89,9 @@ static struct ast_frame *h263_read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -81,9 +81,9 @@ static struct ast_frame *h264_read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -53,9 +53,9 @@ static struct ast_frame *ilbc_read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -88,9 +88,9 @@ static struct ast_frame *pcm_read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -49,9 +49,9 @@ static struct ast_frame *siren14read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -49,9 +49,9 @@ static struct ast_frame *siren7read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -43,9 +43,9 @@ static struct ast_frame *generic_read(struct ast_filestream *s, int *whennext, u
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -49,9 +49,9 @@ static struct ast_frame *vox_read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -396,9 +396,9 @@ static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) != s->fr.datalen) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), s->fr.datalen, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
@@ -426,9 +426,9 @@ static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext)
|
||||
if ((res = fread(msdata, 1, MSGSM_FRAME_SIZE, s->f)) != MSGSM_FRAME_SIZE) {
|
||||
if (feof(s->f)) {
|
||||
if (res) {
|
||||
ast_log(LOG_WARNING, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), MSGSM_FRAME_SIZE, res);
|
||||
ast_debug(3, "Incomplete frame data at end of %s file "
|
||||
"(expected %d bytes, read %d)\n",
|
||||
ast_format_get_name(s->fr.subclass.format), MSGSM_FRAME_SIZE, res);
|
||||
}
|
||||
} else {
|
||||
ast_log(LOG_ERROR, "Error while reading %s file: %s\n",
|
||||
|
Reference in New Issue
Block a user