From 343b774d219efcb8783094d46f8497a0c3ee089b Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 5 Jun 2018 23:41:37 +0200 Subject: [PATCH] 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 --- bsc/MSC_ConnectionHandler.ttcn | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 225e86b8a..084676284 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -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; + } } }