[MERGED] osmo-ttcn3-hacks[master]: BSC: Do not access unbound BTS objects

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
Fri Feb 16 18:33:36 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: BSC: Do not access unbound BTS objects
......................................................................


BSC: Do not access unbound BTS objects

BTS[1] in function f_start_handler() is not always populated.

- Check BTS[1] before accessing it.

Change-Id: I37fdf7e6ef521677613f4eadc6f1ea236c04ce8e
---
M bsc/BSC_Tests.ttcn
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index cccec49..796aea3 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1277,8 +1277,10 @@
 	connect(vc_conn:MGCP_PROC, vc_MGCP:MGCP_PROC);
 	connect(vc_conn:RSL, bts[0].rsl.vc_RSL:CLIENT_PT);
 	connect(vc_conn:RSL_PROC, bts[0].rsl.vc_RSL:RSL_PROC);
-	connect(vc_conn:RSL1, bts[1].rsl.vc_RSL:CLIENT_PT);
-	connect(vc_conn:RSL1_PROC, bts[1].rsl.vc_RSL:RSL_PROC);
+	if (isbound(bts[1])) {
+		connect(vc_conn:RSL1, bts[1].rsl.vc_RSL:CLIENT_PT);
+		connect(vc_conn:RSL1_PROC, bts[1].rsl.vc_RSL:RSL_PROC);
+	}
 	connect(vc_conn:BSSAP, g_bssap.vc_BSSMAP:CLIENT);
 	connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT);
 	vc_conn.start(derefers(fn)(id));

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

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



More information about the gerrit-log mailing list