diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2023-04-17 12:46:01 +0200 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2023-04-18 11:45:39 +0200 |
commit | d07528148e9cfed8ec6bd96a5d9cefb2d6990eca (patch) | |
tree | 152e520b8db19febd21dfea06ea9fe84957fd212 | |
parent | 08d0c099027553acd04d06375ba2be647375a513 (diff) |
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
-rw-r--r-- | src/input/e1d.c | 6 |
1 files changed, 4 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 @@ handle_ts_trau_read(struct osmo_fd *bfd) 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 @@ static int handle_ts_raw_read(struct osmo_fd *bfd) 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; } |