ctl: properly set the timeslot mode in E1DP_CMD_TS_QUERY

Change-Id: Ie7bfec19e37f748d44f4a90d296ea232bbd76b12
This commit is contained in:
Harald Welte 2021-05-10 22:00:46 +02:00
parent a82fe56aea
commit 910c502bf6
1 changed files with 13 additions and 1 deletions

View File

@ -81,7 +81,19 @@ static void
_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;
}