dexter has submitted this change. (
https://gerrit.osmocom.org/c/libosmo-abis/+/32336 )
Change subject: e1d: fix log output
......................................................................
e1d: fix log output
When a read access to the osmo-e1d fd fails we just print the error to
LOGL_DEBUG but an error like this should be logged to LOGL_ERROR. Also
the line might print "read error 0 Success", which is a bit misleading,
so let's fix this as well.
Change-Id: I3a0500f083cbe8cc162826e2ec974875bafcaba9
---
M src/input/e1d.c
1 file changed, 18 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/input/e1d.c b/src/input/e1d.c
index 6392b4f..a42c87d 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -164,7 +164,8 @@
ret = read(bfd->fd, msg->data, D_TSX_ALLOC_SIZE);
if (ret < 0 || ret != D_TSX_ALLOC_SIZE) {
- LOGPITS(e1i_ts, DLINP, LOGL_DEBUG, "read error %d %s\n", ret,
strerror(errno));
+ LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "%s read error: %d %s\n", __func__, ret,
+ ret < 0 ? strerror(errno) : "bytes read");
return ret;
}
@@ -233,7 +234,8 @@
ret = read(bfd->fd, msg->data, D_TSX_ALLOC_SIZE);
if (ret < 0 || ret != D_TSX_ALLOC_SIZE) {
- LOGPITS(e1i_ts, DLINP, LOGL_DEBUG, "read error %d %s\n", ret,
strerror(errno));
+ LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "%s read error: %d %s\n", __func__, ret,
+ ret < 0 ? strerror(errno) : "bytes read");
msgb_free(msg);
return ret;
}
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-abis/+/32336
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I3a0500f083cbe8cc162826e2ec974875bafcaba9
Gerrit-Change-Number: 32336
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged