SGSN_Tests: turn f_gmm_gsup_lu_isd() into an altstep
This way it can be used in the alt statements.
Change-Id: I1baaf6ed66cfaa75237b0abdce82ffdc7e672b96
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 7cdf72c..3946058 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -872,15 +872,14 @@
}
}
-private function f_gmm_gsup_lu_isd() runs on BSSGP_ConnHdlr {
- var GSUP_PDU gsup;
- /* Expect MSC to perform LU with HLR */
- GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi));
- gsup := valueof(ts_GSUP_ISD_REQ(g_pars.imsi, g_pars.msisdn));
- gsup.ies := gsup.ies & { valueof(ts_GSUP_IE_PdpInfo(char2oct("*"), '0121'O, ''O)) };
- GSUP.send(gsup);
- GSUP.receive(tr_GSUP_ISD_RES(g_pars.imsi));
- GSUP.send(ts_GSUP_UL_RES(g_pars.imsi));
+private altstep as_gmm_gsup_lu_isd() runs on BSSGP_ConnHdlr {
+ [] GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)) {
+ var GSUP_PDU gsup := valueof(ts_GSUP_ISD_REQ(g_pars.imsi, g_pars.msisdn));
+ gsup.ies := gsup.ies & { valueof(ts_GSUP_IE_PdpInfo(char2oct("*"), '0121'O, ''O)) };
+ GSUP.send(gsup);
+ GSUP.receive(tr_GSUP_ISD_RES(g_pars.imsi));
+ GSUP.send(ts_GSUP_UL_RES(g_pars.imsi));
+ }
}
friend function f_gmm_attach(boolean umts_aka_challenge, boolean force_gsm_sres, integer ran_index := 0,
@@ -906,7 +905,7 @@
f_send_l3(attach_req, ran_index);
f_gmm_auth(umts_aka_challenge, force_gsm_sres, ran_index);
/* Expect SGSN to perform LU with HLR */
- f_gmm_gsup_lu_isd();
+ as_gmm_gsup_lu_isd();
l3_mt := f_receive_l3(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?), ran_index);
f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept, ran_index);
@@ -1041,7 +1040,7 @@
attach_req := ts_GMM_ATTACH_REQ(f_mi_get_lv(), rai, false, false, omit, omit);
f_send_l3(attach_req, ran_index);
f_gmm_auth(false, false, ran_index);
- f_gmm_gsup_lu_isd();
+ as_gmm_gsup_lu_isd();
BSSGP[ran_index].clear;
log("Trying to receive ", gmm_attach_repeats, " ATTACH ACCEPTs");
@@ -1216,7 +1215,7 @@
f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, true, false, omit, omit));
f_gmm_auth();
/* Expect MSC to perform LU with HLR */
- f_gmm_gsup_lu_isd();
+ as_gmm_gsup_lu_isd();
BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt {
f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);
@@ -2579,7 +2578,7 @@
f_send_l3(ts_GMM_ATTACH_REQ(f_mi_get_lv(), f_random_RAI(), true, false, omit, omit));
f_gmm_auth();
/* Expect SGSN to perform LU with HLR */
- f_gmm_gsup_lu_isd();
+ as_gmm_gsup_lu_isd();
timer T := 10.0;
T.start;
@@ -2887,7 +2886,7 @@
deactivate(di);
/* Expect SGSN to perform LU with HLR */
- f_gmm_gsup_lu_isd();
+ as_gmm_gsup_lu_isd();
BSSGP[0].receive(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?)) -> value l3_mt {
f_process_attach_accept(l3_mt.msgs.gprs_mm.attachAccept);