msc: rework f_expect_paging(): handle mismatch and timeout
When a received Paging mismatches, instead of waiting for Tguard timeout, fail immediately. Add a local timer and wait 4.0 seconds by default. Change-Id: I30273e3882e348a2ded88b7b96a5ec1473a56913 Tweaked-By: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
This commit is contained in:
parent
1af4b0f625
commit
eb81ca46dc
|
@ -1357,18 +1357,32 @@ runs on BSC_ConnHdlr {
|
|||
log("f_mt_call_complete DONE");
|
||||
}
|
||||
|
||||
function f_expect_paging_tmsi(template OCT4 tmsi := *)
|
||||
function f_expect_paging_tmsi(template OCT4 tmsi := *, float Tval := 4.0)
|
||||
runs on BSC_ConnHdlr {
|
||||
if (g_pars.ran_is_geran) {
|
||||
BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi, tmsi));
|
||||
} else {
|
||||
BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi)));
|
||||
timer T;
|
||||
|
||||
T.start(Tval);
|
||||
alt {
|
||||
[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi, tmsi));
|
||||
[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_Paging(?, *)) {
|
||||
setverdict(fail, "Paging message doesn't match expectations");
|
||||
mtc.stop;
|
||||
}
|
||||
[not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi)));
|
||||
[not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(?, ?)) {
|
||||
setverdict(fail, "Paging message doesn't match expectations");
|
||||
mtc.stop;
|
||||
}
|
||||
[] T.timeout {
|
||||
setverdict(fail, "Timeout waiting for paging");
|
||||
mtc.stop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function f_expect_paging()
|
||||
function f_expect_paging(float Tval := 4.0)
|
||||
runs on BSC_ConnHdlr {
|
||||
f_expect_paging_tmsi(g_pars.tmsi);
|
||||
f_expect_paging_tmsi(g_pars.tmsi, Tval);
|
||||
}
|
||||
|
||||
function f_mt_call_establish(inout CallParameters cpars)
|
||||
|
|
Loading…
Reference in New Issue