Change in libosmo-abis[master]: dahdi: Don't use perror() directly, use osmocom logging instead

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Jan 12 12:57:58 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/16817 )

Change subject: dahdi: Don't use perror() directly, use osmocom logging instead
......................................................................

dahdi: Don't use perror() directly, use osmocom logging instead

Change-Id: I287e10ee49a8ac26eef903568b29a3b2abf3b43e
---
M src/input/dahdi.c
1 file changed, 8 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/input/dahdi.c b/src/input/dahdi.c
index 5da0a2d..4d01fe0 100644
--- a/src/input/dahdi.c
+++ b/src/input/dahdi.c
@@ -181,11 +181,13 @@
 	if (ret == -1)
 		handle_dahdi_exception(e1i_ts);
 	else if (ret < 0) {
-		perror("read ");
+		LOGP(DLMI, LOGL_ERROR, "%s read failed %d (%s)\n", __func__, ret, strerror(errno));
+		return ret;
 	}
 	msgb_put(msg, ret - 2);
 	if (ret <= 3) {
-		perror("read ");
+		LOGP(DLMI, LOGL_ERROR, "%s read failed %d (%s)\n", __func__, ret, strerror(errno));
+		return ret;
 	}
 
 	return e1inp_rx_ts_lapd(e1i_ts, msg);
@@ -294,11 +296,13 @@
 	if (ret == -1)
 		handle_dahdi_exception(e1i_ts);
 	else if (ret < 0) {
-		perror("read ");
+		LOGP(DLMI, LOGL_ERROR, "%s read failed %d (%s)\n", __func__, ret, strerror(errno));
+		return ret;
 	}
 	msgb_put(msg, ret - 2);
 	if (ret <= 3) {
-		perror("read ");
+		LOGP(DLMI, LOGL_ERROR, "%s read failed %d (%s)\n", __func__, ret, strerror(errno));
+		return ret;
 	}
 
 	return e1inp_rx_ts(e1i_ts, msg, 0, 0);

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/16817
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I287e10ee49a8ac26eef903568b29a3b2abf3b43e
Gerrit-Change-Number: 16817
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200112/ddc5d49c/attachment.htm>


More information about the gerrit-log mailing list