[MERGED] osmo-ttcn3-hacks[master]: MSC_ConnHdlr: Fix f_rsl_reply() for RSL_MT_ENCR_CMD

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Dec 17 18:02:56 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: MSC_ConnHdlr: Fix f_rsl_reply() for RSL_MT_ENCR_CMD
......................................................................


MSC_ConnHdlr: Fix f_rsl_reply() for RSL_MT_ENCR_CMD

In all RSL messages the link identifier is usually the second IE.
However, as the only known exception, the RSL Encryption Command has it
as third IE.

Fixes the following error message:
Dynamic test case error: Using non-selected field link_id in a value of
union type @RSL_Types.RSL_IE_Body

Change-Id: I2bbb83b5394d0b693a47d286beed5c699ab6e8ae
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index a76d1d6..028f1b4 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -96,6 +96,11 @@
 function f_rsl_reply(template PDU_ML3_MS_NW l3, RSL_Message orig) runs on MSC_ConnHdlr {
 	var RslChannelNr chan_nr := orig.ies[0].body.chan_nr;
 	var RslLinkId link_id := orig.ies[1].body.link_id;
+	if (orig.msg_type == RSL_MT_ENCR_CMD) {
+		link_id := orig.ies[2].body.link_id;
+	} else {
+		link_id := orig.ies[1].body.link_id;
+	}
 	RSL.send(ts_RSL_DATA_IND(chan_nr, link_id, enc_PDU_ML3_MS_NW(valueof(l3))));
 }
 

-- 
To view, visit https://gerrit.osmocom.org/5457
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2bbb83b5394d0b693a47d286beed5c699ab6e8ae
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list