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/.

dexter gerrit-no-reply at lists.osmocom.org
Tue Aug 18 19:00:02 UTC 2020


dexter has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/10/19710/1

diff --git a/src/libosmo-mgcp/mgcp_e1.c b/src/libosmo-mgcp/mgcp_e1.c
index b3db0b7..d5dfefd 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_DEBUG, "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_DEBUG, "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: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200818/24191d72/attachment.htm>


More information about the gerrit-log mailing list