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
Tue May 11 16:50:14 UTC 2021


keith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/24196 )

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, 16 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  tnt: Looks good to me, but someone else must approve
  keith: Looks good to me, approved



diff --git a/src/ctl.c b/src/ctl.c
index 1775423..b633b9b 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -81,11 +81,25 @@
 _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;
+	case E1_TS_MODE_OFF:
+		ti->cfg.mode = E1DP_TSMODE_OFF;
+		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: 3
Gerrit-Owner: keith <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: keith <keith at rhizomatica.org>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: tnt <tnt at 246tNt.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210511/34a40f30/attachment.htm>


More information about the gerrit-log mailing list