Change in osmo-mgw[master]: mgcp_e1: make E1 ts initalization more debugable

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
Mon Aug 31 15:00:51 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/19710 )

Change subject: mgcp_e1: make E1 ts initalization more debugable
......................................................................

mgcp_e1: make E1 ts initalization more debugable

The E1 timeslot initalization may fail silently in the last steps. There
is an error code returned, but no log lines are printed. This can make
debugging difficult.

Change-Id: I9aab17fc1ba6666c81b14035a8f1f17e5a55adaf
---
M src/libosmo-mgcp/mgcp_e1.c
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/src/libosmo-mgcp/mgcp_e1.c b/src/libosmo-mgcp/mgcp_e1.c
index b3db0b7..3bd9a99 100644
--- a/src/libosmo-mgcp/mgcp_e1.c
+++ b/src/libosmo-mgcp/mgcp_e1.c
@@ -400,11 +400,15 @@
 
 	/* Configure E1 timeslot */
 	rc = e1inp_ts_config_raw(&e1_line->ts[ts_nr - 1], e1_line, e1_recv_cb);
-	if (rc < 0)
+	if (rc < 0) {
+		LOGPTRUNK(trunk, DE1, LOGL_ERROR, "failed to put E1 timeslot %u in raw mode.\n", ts_nr);
 		return -EINVAL;
+	}
 	rc = e1inp_line_update(e1_line);
-	if (rc < 0)
+	if (rc < 0) {
+		LOGPTRUNK(trunk, DE1, LOGL_ERROR, "failed to update E1 timeslot %u.\n", ts_nr);
 		return -EINVAL;
+	}
 
 	LOGPTRUNK(trunk, DE1, LOGL_DEBUG, "E1 timeslot %u set up successfully.\n", ts_nr);
 	trunk->e1.ts_in_use[ts_nr - 1] = true;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/19710
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I9aab17fc1ba6666c81b14035a8f1f17e5a55adaf
Gerrit-Change-Number: 19710
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200831/4852f32a/attachment.htm>


More information about the gerrit-log mailing list