summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/host/trxcon/trx_if.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index 91075f44..e53fab27 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -444,8 +444,10 @@ static int trx_ctrl_read_cb(struct osmo_fd *ofd, unsigned int what)
char buf[1500], *p;
len = read(ofd->fd, buf, sizeof(buf) - 1);
- if (len <= 0)
+ if (len <= 0) {
+ LOGP(DTRX, LOGL_ERROR, "read() failed with rc=%d\n", len);
return len;
+ }
buf[len] = '\0';
if (!!strncmp(buf, "RSP ", 4)) {
@@ -551,8 +553,10 @@ static int trx_data_rx_cb(struct osmo_fd *ofd, unsigned int what)
int len;
len = read(ofd->fd, buf, sizeof(buf));
- if (len <= 0)
+ if (len <= 0) {
+ LOGP(DTRXD, LOGL_ERROR, "read() failed with rc=%d\n", len);
return len;
+ }
if (len != 158) {
LOGP(DTRXD, LOGL_ERROR, "Got data message with invalid "