sgsn: Reduce code duplication by introducing f_gmm_gsup_lu_isd()
Change-Id: I7a43eaa75201fc6c3afba67f6161aef872aca546
This commit is contained in:
parent
23178c590e
commit
311ec27f42
|
@ -247,6 +247,7 @@ altstep as_mm_identity() runs on BSSGP_ConnHdlr {
|
|||
}
|
||||
}
|
||||
|
||||
/* perform GMM authentication (if expected) */
|
||||
function f_gmm_auth () runs on BSSGP_ConnHdlr {
|
||||
var BssgpDecoded bd;
|
||||
var PDU_L3_MS_SGSN l3_mo;
|
||||
|
@ -314,6 +315,14 @@ private function f_mi_get_lv() runs on BSSGP_ConnHdlr return MobileIdentityLV {
|
|||
}
|
||||
}
|
||||
|
||||
private function f_gmm_gsup_lu_isd() runs on BSSGP_ConnHdlr {
|
||||
/* Expect MSC to perform LU with HLR */
|
||||
GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi));
|
||||
GSUP.send(ts_GSUP_ISD_REQ(g_pars.imsi, g_pars.msisdn));
|
||||
GSUP.receive(tr_GSUP_ISD_RES(g_pars.imsi));
|
||||
GSUP.send(ts_GSUP_UL_RES(g_pars.imsi));
|
||||
}
|
||||
|
||||
private function f_TC_attach(charstring id) runs on BSSGP_ConnHdlr {
|
||||
var BssgpDecoded bd;
|
||||
var RoutingAreaIdentificationV old_ra := f_random_RAI();
|
||||
|
@ -321,10 +330,7 @@ private function f_TC_attach(charstring id) runs on BSSGP_ConnHdlr {
|
|||
BSSGP.send(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, false, false, omit, omit));
|
||||
f_gmm_auth();
|
||||
/* Expect MSC to perform LU with HLR */
|
||||
GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi));
|
||||
GSUP.send(ts_GSUP_ISD_REQ(g_pars.imsi, g_pars.msisdn));
|
||||
GSUP.receive(tr_GSUP_ISD_RES(g_pars.imsi));
|
||||
GSUP.send(ts_GSUP_UL_RES(g_pars.imsi));
|
||||
f_gmm_gsup_lu_isd();
|
||||
|
||||
BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd {
|
||||
f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
|
||||
|
@ -474,10 +480,7 @@ private function f_TC_attach_combined(charstring id) runs on BSSGP_ConnHdlr {
|
|||
BSSGP.send(ts_GMM_ATTACH_REQ(f_mi_get_lv(), old_ra, true, false, omit, omit));
|
||||
f_gmm_auth();
|
||||
/* Expect MSC to perform LU with HLR */
|
||||
GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi));
|
||||
GSUP.send(ts_GSUP_ISD_REQ(g_pars.imsi, g_pars.msisdn));
|
||||
GSUP.receive(tr_GSUP_ISD_RES(g_pars.imsi));
|
||||
GSUP.send(ts_GSUP_UL_RES(g_pars.imsi));
|
||||
f_gmm_gsup_lu_isd();
|
||||
|
||||
BSSGP.receive(tr_BD_L3_MT(tr_GMM_ATTACH_ACCEPT('001'B, ?, ?))) -> value bd {
|
||||
f_process_attach_accept(bd.l3_mt.msgs.gprs_mm.attachAccept);
|
||||
|
|
Loading…
Reference in New Issue