Vadim Yanitskiy has submitted this change and it was merged. (
https://gerrit.osmocom.org/13957 )
Change subject: trxcon/trx_if.c: print error message if read() call fails
......................................................................
trxcon/trx_if.c: print error message if read() call fails
Change-Id: If3aaa730c306e703d1d430a8920284aa592c999c
---
M src/host/trxcon/trx_if.c
1 file changed, 6 insertions(+), 2 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index 91075f4..e53fab2 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -444,8 +444,10 @@
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 @@
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 "
--
To view, visit https://gerrit.osmocom.org/13957
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If3aaa730c306e703d1d430a8920284aa592c999c
Gerrit-Change-Number: 13957
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <[email protected]>