[S] Change in osmo-ttcn3-hacks[master]: GTP_Emulation: SGSN_ContextRequest: Fix unconditional access to optio...
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35477?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )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: I0721f25deeae822150a39e52916b8bf272de21ee --- M library/GTP_Emulation.ttcn 1 file changed, 14 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/GTP_Emulation.ttcn b/library/GTP_Emulation.ttcn index 6297c4f..689fb0d 100644 --- a/library/GTP_Emulation.ttcn +++ b/library/GTP_Emulation.ttcn @@ -134,7 +134,11 @@ } else if (ischosen(gtp.gtpc_pdu.identificationResponse) ){ return gtp.gtpc_pdu.identificationResponse.imsi.digits; } else if (ischosen(gtp.gtpc_pdu.sgsn_ContextRequest)) { - return gtp.gtpc_pdu.sgsn_ContextRequest.imsi.digits; + if (ispresent(gtp.gtpc_pdu.sgsn_ContextRequest.imsi.digits)) { + return gtp.gtpc_pdu.sgsn_ContextRequest.imsi.digits; + } else { + return omit; + } } else if (ischosen(gtp.gtpc_pdu.sgsn_ContextResponse)) { if (ispresent(gtp.gtpc_pdu.sgsn_ContextResponse.imsi.digits)) { return gtp.gtpc_pdu.sgsn_ContextResponse.imsi.digits; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35477?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: I0721f25deeae822150a39e52916b8bf272de21ee Gerrit-Change-Number: 35477 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
pespin