diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2024-04-14 18:55:02 +0700 |
---|---|---|
committer | fixeria <vyanitskiy@sysmocom.de> | 2024-04-15 15:18:28 +0000 |
commit | eb81ca46dc0b187fda46e4070a88966d1adcc68a (patch) | |
tree | 3bbb1cd9c936a02c1712e0ac5094b871fc9aff99 | |
parent | 1af4b0f625997c08464b6e317c06716038e8aaa0 (diff) |
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>
-rw-r--r-- | msc/BSC_ConnectionHandler.ttcn | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 75eb8923..5714fbf0 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -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) |