dexter submitted this change.
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(-)
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 change 32336. To unsubscribe, or for help writing mail filters, visit settings.