pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35375?usp=email ) Change subject: GTP_Emulation: SGSN_ContextRequest: Fix unconditional access to optional field IMSI ...................................................................... GTP_Emulation: SGSN_ContextRequest: Fix unconditional access to optional field IMSI Change-Id: I254f790aeb7c491200b86bec3c22ae56c452c2df --- M library/GTP_Emulation.ttcn 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/75/35375/1 diff --git a/library/GTP_Emulation.ttcn b/library/GTP_Emulation.ttcn index 4ea293c..6297c4f 100644 --- a/library/GTP_Emulation.ttcn +++ b/library/GTP_Emulation.ttcn @@ -136,7 +136,11 @@ } else if (ischosen(gtp.gtpc_pdu.sgsn_ContextRequest)) { return gtp.gtpc_pdu.sgsn_ContextRequest.imsi.digits; } else if (ischosen(gtp.gtpc_pdu.sgsn_ContextResponse)) { - return gtp.gtpc_pdu.sgsn_ContextResponse.imsi.digits; + if (ispresent(gtp.gtpc_pdu.sgsn_ContextResponse.imsi.digits)) { + return gtp.gtpc_pdu.sgsn_ContextResponse.imsi.digits; + } else { + return omit; + } } else if (ischosen(gtp.gtpc_pdu.forwardRelocationRequest)) { return gtp.gtpc_pdu.forwardRelocationRequest.imsi.digits; } else if (ischosen(gtp.gtpc_pdu.relocationCancelRequest)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35375?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I254f790aeb7c491200b86bec3c22ae56c452c2df Gerrit-Change-Number: 35375 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange