MSC_ConnHdlr: Fix RlsChannelNr encoding in f_ChDesc2RslChanNr()
Make sure that the "tag" member of the RslChanelNr sub-structure is always initialized. This can be achieved without any extra code by using the existing templates rather than hand-coding it. Change-Id: I990ac8ac0ce51e11f1d683382c9fc2d4e1201aa7
This commit is contained in:
parent
e97eab4da4
commit
6fa1f73346
|
@ -477,20 +477,19 @@ runs on MSC_ConnHdlr {
|
|||
/* Convert from Ericsson ChanDesc2 format to Osmocom RslChannelNr format */
|
||||
function f_ChDesc2RslChanNr(ChannelDescription2_V ch_desc, out RslChannelNr chan_nr, out GsmArfcn arfcn) {
|
||||
var BIT5 inp := ch_desc.channelTypeandTDMAOffset;
|
||||
|
||||
chan_nr.tn := bit2int(ch_desc.timeslotNumber);
|
||||
var uint3_t tn := bit2int(ch_desc.timeslotNumber);
|
||||
|
||||
if (match(inp, '00001'B)) { /* TCH/F */
|
||||
chan_nr.u.ch0 := RSL_CHAN_NR_Bm_ACCH;
|
||||
chan_nr := valueof(t_RslChanNr_Bm(tn));
|
||||
}
|
||||
else if (match(inp, '0001?'B)) { /* TCH/H */
|
||||
chan_nr.u.lm.sub_chan := bit2int(substr(inp, 4, 1));
|
||||
chan_nr := valueof(t_RslChanNr_Lm(tn, bit2int(substr(inp, 4, 1))));
|
||||
}
|
||||
else if (match(inp, '001??'B)) { /* SDCCH/4 */
|
||||
chan_nr.u.sdcch4.sub_chan := bit2int(substr(inp, 3, 2));
|
||||
chan_nr := valueof(t_RslChanNr_SDCCH4(tn, bit2int(substr(inp, 3, 2))));
|
||||
}
|
||||
else if (match(inp, '01???'B)) { /* SDCCH/8 */
|
||||
chan_nr.u.sdcch8.sub_chan := bit2int(substr(inp, 2, 3));
|
||||
chan_nr := valueof(t_RslChanNr_SDCCH8(tn, bit2int(substr(inp, 2, 3))));
|
||||
}
|
||||
else {
|
||||
setverdict(fail, "Unknown ChDesc!");
|
||||
|
|
Loading…
Reference in New Issue