Change in osmo-e1d[master]: ctl: properly set the timeslot mode in E1DP_CMD_TS_QUERY

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

keith gerrit-no-reply at lists.osmocom.org
Mon May 10 22:28:59 UTC 2021


Hello laforge,

I'd like you to do a code review. Please visit

    https://gerrit.osmocom.org/c/osmo-e1d/+/24196

to review the following change.


Change subject: ctl: properly set the timeslot mode in E1DP_CMD_TS_QUERY
......................................................................

ctl: properly set the timeslot mode in E1DP_CMD_TS_QUERY

Change-Id: Ie7bfec19e37f748d44f4a90d296ea232bbd76b12
---
M src/ctl.c
1 file changed, 13 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/96/24196/1

diff --git a/src/ctl.c b/src/ctl.c
index 1775423..143de25 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -81,11 +81,22 @@
 _e1d_fill_ts_info(struct osmo_e1dp_ts_info *ti, struct e1_ts *ts)
 {
 	ti->id = ts->id;
-	ti->cfg.mode = 0;
+
+	switch (ts->mode) {
+	case E1_TS_MODE_RAW:
+		ti->cfg.mode = E1DP_TSMODE_RAW;
+		break;
+	case E1_TS_MODE_HDLCFCS:
+		ti->cfg.mode = E1DP_TSMODE_HDLCFCS;
+		break;
+	default:
+		LOGPTS(ts, DE1D, LOGL_NOTICE, "TS in unknown mode %u?x\n", ts->mode);
+		ti->cfg.mode = 0;
+		break;
+	}
 	ti->status = 0;
 }
 
-
 void
 e1_ts_stop(struct e1_ts *ts)
 {

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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Ie7bfec19e37f748d44f4a90d296ea232bbd76b12
Gerrit-Change-Number: 24196
Gerrit-PatchSet: 1
Gerrit-Owner: keith <keith at rhizomatica.org>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210510/4dcfd91e/attachment.htm>


More information about the gerrit-log mailing list