BSSMAP_Emulation: ispresent(bssap.pdu.bssmap) before accessing fields
This seems not to be required on TITAN 6.3.0 on my laptop, but the
older 6.1.0 on Debian 9 seems to need it.
Change-Id: I574d8b79ac43e0fceddb3f9815666aef0ed66a3f
diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn
index ca5afb9..5f0409f 100644
--- a/library/BSSMAP_Emulation.ttcn
+++ b/library/BSSMAP_Emulation.ttcn
@@ -334,13 +334,15 @@
runs on BSSMAP_Emulation_CT {
/* decode + send decoded BSSAP to client */
- /* BSC Side: If this is an assignment command, store CIC */
- if (ischosen(bssap.pdu.bssmap.assignmentRequest) and
- ispresent(bssap.pdu.bssmap.assignmentRequest.circuitIdentityCode)) {
- var BSSMAP_IE_CircuitIdentityCode cic_ie :=
- bssap.pdu.bssmap.assignmentRequest.circuitIdentityCode;
- var integer cic := (oct2int(cic_ie.cicHigh) * 256) + oct2int(cic_ie.cicLow);
- f_comp_store_cic(client, cic);
+ if (ischosen(bssap.pdu.bssmap)) {
+ /* BSC Side: If this is an assignment command, store CIC */
+ if (ischosen(bssap.pdu.bssmap.assignmentRequest) and
+ ispresent(bssap.pdu.bssmap.assignmentRequest.circuitIdentityCode)) {
+ var BSSMAP_IE_CircuitIdentityCode cic_ie :=
+ bssap.pdu.bssmap.assignmentRequest.circuitIdentityCode;
+ var integer cic := (oct2int(cic_ie.cicHigh) * 256) + oct2int(cic_ie.cicLow);
+ f_comp_store_cic(client, cic);
+ }
}
if (ischosen(bssap.pdu.dtap) and g_bssmap_ops.decode_dtap) {