[MERGED] osmo-ttcn3-hacks[master]: RSL_Emulation: Initialize the ConnectionTable

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
Wed Jan 17 12:57:10 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: RSL_Emulation: Initialize the ConnectionTable
......................................................................


RSL_Emulation: Initialize the ConnectionTable

By default all the elements in the conn table seem to be considered
<unbound>.
f_cid_create() manages to set ra, ra_fn and comp_ref in the
ConnectionData element, but checking for
ispresent(ConnectionTable[i].ra) still returns false while
log(ConnectionTable[i].ra) returns 23. Setting every optional element to
omit as f_cid_clear() does before using the connection table seems to
solve this issue.

The assignment_fr_* tests now continue after receiving the Immediate
Assignment, but still fail after receiving the CM Service Request.

Change-Id: I24205425c5b6ae5b8a0f6288ba89ea5a1dc4669d
---
M library/RSL_Emulation.ttcn
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index 7c5a168..a19e627 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -214,6 +214,8 @@
 	var integer cid;
 	var integer i;
 
+	f_conn_table_init();
+
 	while (true) {
 		alt {
 		[] IPA_PT.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}) {
@@ -315,5 +317,14 @@
 	}
 }
 
+private function f_conn_table_init()
+runs on RSL_Emulation_CT {
+	var integer i;
+
+	/* Initialize the ConnectionTable */
+	for (i := 0; i < sizeof(ConnectionTable); i := i+1) {
+		f_cid_clear(i);
+	}
+}
 
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24205425c5b6ae5b8a0f6288ba89ea5a1dc4669d
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>



More information about the gerrit-log mailing list