summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-03-27 15:02:51 +0100
committerHarald Welte <laforge@gnumonks.org>2019-03-27 15:07:43 +0100
commitbc176534c8e19c14c75f523436a6147ca5f8e882 (patch)
tree415a00e8e89ec285c3c29b112f4024b91de67ff8
parent0e28df2510c388366b52e15c369a9934177c0cde (diff)
BSSAP_Adapter: only initialize ops.sccp_addr_* if ops is givenlaforge/gb-sns
It's legal to call f_bssap_init() with 'ops := omit', and in that case we must not assume ops.sccp_addr_* members can be written to. Change-Id: I73b2ea8b2d4c9461efd5bbe94e8a1a2b59369259
-rw-r--r--library/BSSAP_Adapter.ttcn4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/BSSAP_Adapter.ttcn b/library/BSSAP_Adapter.ttcn
index cebdffe..a3884ad 100644
--- a/library/BSSAP_Adapter.ttcn
+++ b/library/BSSAP_Adapter.ttcn
@@ -81,12 +81,12 @@ private function init_pars(inout BSSAP_Adapter ba, in BSSAP_Configuration cfg) {
function f_bssap_init(inout BSSAP_Adapter ba, in BSSAP_Configuration cfg, charstring id,
template BssmapOps ops) {
init_pars(ba, cfg);
- ops.sccp_addr_local := ba.sccp_addr_own;
- ops.sccp_addr_peer := ba.sccp_addr_peer;
/* create components */
ba.vc_SCCP := SCCP_CT.create(id & "-SCCP");
if (isvalue(ops)) {
+ ops.sccp_addr_local := ba.sccp_addr_own;
+ ops.sccp_addr_peer := ba.sccp_addr_peer;
ba.vc_BSSMAP := BSSMAP_Emulation_CT.create(id & "-BSSMAP");
}
select (cfg.transport) {