[asterisk-commits] cleanup: Change severity of fread short-read warning (asterisk[13])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 2 15:26:37 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5573 )
Change subject: cleanup: Change severity of fread short-read warning
......................................................................
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
---
M formats/format_g719.c
M formats/format_g723.c
M formats/format_g726.c
M formats/format_g729.c
M formats/format_gsm.c
M formats/format_h263.c
M formats/format_h264.c
M formats/format_ilbc.c
M formats/format_pcm.c
M formats/format_siren14.c
M formats/format_siren7.c
M formats/format_sln.c
M formats/format_vox.c
M formats/format_wav.c
M formats/format_wav_gsm.c
15 files changed, 45 insertions(+), 45 deletions(-)
Approvals:
George Joseph: Looks good to me, approved
Richard Mudgett: Looks good to me, but someone else must approve
Jenkins2: Approved for Submit
diff --git a/formats/format_g719.c b/formats/format_g719.c
index b93cf0b..6678585 100644
--- a/formats/format_g719.c
+++ b/formats/format_g719.c
@@ -49,9 +49,9 @@
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",
diff --git a/formats/format_g723.c b/formats/format_g723.c
index 5eed3f5..1182124 100644
--- a/formats/format_g723.c
+++ b/formats/format_g723.c
@@ -69,9 +69,9 @@
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",
diff --git a/formats/format_g726.c b/formats/format_g726.c
index 0455d6d..94623f4 100644
--- a/formats/format_g726.c
+++ b/formats/format_g726.c
@@ -128,9 +128,9 @@
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",
diff --git a/formats/format_g729.c b/formats/format_g729.c
index fa122d3..04dfbcf 100644
--- a/formats/format_g729.c
+++ b/formats/format_g729.c
@@ -55,9 +55,9 @@
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",
diff --git a/formats/format_gsm.c b/formats/format_gsm.c
index 07aba9f..cfc9452 100644
--- a/formats/format_gsm.c
+++ b/formats/format_gsm.c
@@ -61,9 +61,9 @@
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",
diff --git a/formats/format_h263.c b/formats/format_h263.c
index 5c23923..5d59972 100644
--- a/formats/format_h263.c
+++ b/formats/format_h263.c
@@ -89,9 +89,9 @@
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",
diff --git a/formats/format_h264.c b/formats/format_h264.c
index 5051fd4..f8906f4 100644
--- a/formats/format_h264.c
+++ b/formats/format_h264.c
@@ -81,9 +81,9 @@
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",
diff --git a/formats/format_ilbc.c b/formats/format_ilbc.c
index 2d67ab2..6e06ef3 100644
--- a/formats/format_ilbc.c
+++ b/formats/format_ilbc.c
@@ -53,9 +53,9 @@
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",
diff --git a/formats/format_pcm.c b/formats/format_pcm.c
index cc32ca1..bd7cf77 100644
--- a/formats/format_pcm.c
+++ b/formats/format_pcm.c
@@ -88,9 +88,9 @@
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",
diff --git a/formats/format_siren14.c b/formats/format_siren14.c
index b35ebce..5aaa1f1 100644
--- a/formats/format_siren14.c
+++ b/formats/format_siren14.c
@@ -49,9 +49,9 @@
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",
diff --git a/formats/format_siren7.c b/formats/format_siren7.c
index c7856b2..87e1372 100644
--- a/formats/format_siren7.c
+++ b/formats/format_siren7.c
@@ -49,9 +49,9 @@
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",
diff --git a/formats/format_sln.c b/formats/format_sln.c
index aa47bde..2f4cc57 100644
--- a/formats/format_sln.c
+++ b/formats/format_sln.c
@@ -43,9 +43,9 @@
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",
diff --git a/formats/format_vox.c b/formats/format_vox.c
index e4d1e37..26d4169 100644
--- a/formats/format_vox.c
+++ b/formats/format_vox.c
@@ -49,9 +49,9 @@
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",
diff --git a/formats/format_wav.c b/formats/format_wav.c
index 81807c1..2903992 100644
--- a/formats/format_wav.c
+++ b/formats/format_wav.c
@@ -396,9 +396,9 @@
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",
diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c
index f11b272..2f80a9a 100644
--- a/formats/format_wav_gsm.c
+++ b/formats/format_wav_gsm.c
@@ -426,9 +426,9 @@
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",
--
To view, visit https://gerrit.asterisk.org/5573
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6b617467d687658adca39170a81797a11cc766f6
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list