aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-06-04 22:46:06 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2021-06-05 22:11:20 +0200
commitd601f9c0d6611ae2f36fc63545a8e0cf033d07e8 (patch)
treea4d887674920951a1d10cd1a52576b904626c5ec
parent54ebb4a27ad54333512cd81b26242bd3f546d2da (diff)
MSC_ConnectionHandler: fix race in f_create_chan_and_exp()
During f_create_chan_and_exp() (part of f_establish_fully()), announce the BSSAP L3 expectation before activating the lchan. In RSL_Emulation f_chan_est(), we go through Chan Request, Channel Act and Immediate Assignment followed by EST IND. Right after that, osmo-bsc sends a Complete Layer 3 on BSSAP. But in f_create_chan_and_exp(), we only create the expectation of the BSSAP right after the call to f_chan_est(), i.e. only after sending the EST IND. So far it was always juuust in time to work, but when I added a little check to the end of f_chan_est(), or alternatively an f_sleep(0.2), then BSC tests always fail with: Test case TC_reassignment_fr finished. Verdict: fail reason: Couldn't find Expect for incoming connection { [...] pdu := { bssmap := { completeLayer3Information... } With the BSSAP expectation done first, this error is avoided. Change-Id: I1d4af737dcc0f9c9fa6cdaff3a92813d532e730c
-rw-r--r--bsc/MSC_ConnectionHandler.ttcn2
1 files changed, 1 insertions, 1 deletions
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 37adc18c..c6e82d4e 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -635,9 +635,9 @@ function f_create_chan_and_exp() runs on MSC_ConnHdlr {
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi));
var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3_info);
+ f_create_bssmap_exp(l3_enc);
/* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */
RSL_Emulation.f_chan_est(g_pars.ra, l3_enc, g_pars.link_id, g_pars.fn);
- f_create_bssmap_exp(l3_enc);
}
function f_rsl_send_l3(template PDU_ML3_MS_NW l3, template (omit) RslLinkId link_id := omit,