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
This commit is contained in:
Harald Welte 2018-06-05 23:41:37 +02:00
parent d8604ab9ae
commit 343b774d21
1 changed files with 6 additions and 4 deletions

View File

@ -742,10 +742,12 @@ function f_ass_patch_lcls(inout template (omit) PDU_BSSAP ass_tpl,
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;
}
}
}