bsc: Fix f_establish_fully() for cases where we expect ASSIGN FAIL
When f_ass_patch_lcls() was recently introduced during LCLS support
patches, we broke any testcases that *expected* an ASSIGNMENT FAIL
by overwriting the ASSIGNMENT FAIL with an ASSIGNMENT COMPL.
This patch fixes f_ass_patch_lcls() to only patch 'assignmentComplete'
members, if this assignmentComplete is actually chosen.
This fixes BSC_Tests.TC_assignment_fr_a5_1_codec_missing
Change-Id: I64fbf4cc3178a91913143960475a0d3758779ced
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 225e86b..0846762 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -742,10 +742,12 @@
if (ispresent(g_pars.lcls.csc)) {
ass_tpl.pdu.bssmap.assignmentRequest.lCLS_ConnectionStatusControl := ts_BSSMAP_IE_LclsCsc(g_pars.lcls.csc);
}
- if (ispresent(g_pars.lcls.exp_sts)) {
- ass_cpl.pdu.bssmap.assignmentComplete.lCLS_BSS_Status := tr_BSSMAP_IE_LclsSts(g_pars.lcls.exp_sts);
- } else {
- ass_cpl.pdu.bssmap.assignmentComplete.lCLS_BSS_Status := omit;
+ if (ischosen(ass_cpl.pdu.bssmap.assignmentComplete)) {
+ if (ispresent(g_pars.lcls.exp_sts)) {
+ ass_cpl.pdu.bssmap.assignmentComplete.lCLS_BSS_Status := tr_BSSMAP_IE_LclsSts(g_pars.lcls.exp_sts);
+ } else {
+ ass_cpl.pdu.bssmap.assignmentComplete.lCLS_BSS_Status := omit;
+ }
}
}