diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn index 95cdb7c4d..a37a3b8a6 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -780,41 +780,20 @@ function f_rsl_reply(template PDU_ML3_MS_NW l3, RSL_Message orig, RSL_DCHAN_PT r /* Convert the cipher representation on BSSMAP to the representation used on RSL */ function f_cipher_mode_bssmap_to_rsl(OCT1 alg_bssmap) return RSL_AlgId { - /* A5 0 */ - if (alg_bssmap == '01'O) { - return RSL_ALG_ID_A5_0; - } - /* A5 1 */ - else if (alg_bssmap == '02'O) { - return RSL_ALG_ID_A5_1; - } - /* A5 2 */ - else if (alg_bssmap == '04'O) { - return RSL_ALG_ID_A5_2; - } - /* A5 3 */ - else if (alg_bssmap == '08'O) { - return RSL_ALG_ID_A5_3; - } - /* A5 4 */ - else if (alg_bssmap == '10'O) { - return RSL_ALG_ID_A5_4; - } - /* A5 5 */ - else if (alg_bssmap == '20'O) { - return RSL_ALG_ID_A5_5; - } - /* A5 6 */ - else if (alg_bssmap == '40'O) { - return RSL_ALG_ID_A5_6; - } - /* A5 7 */ - else if (alg_bssmap == '80'O) { - return RSL_ALG_ID_A5_7; - } else { + select (alg_bssmap) { + case ('01'O) { return RSL_ALG_ID_A5_0; } + case ('02'O) { return RSL_ALG_ID_A5_1; } + case ('04'O) { return RSL_ALG_ID_A5_2; } + case ('08'O) { return RSL_ALG_ID_A5_3; } + case ('10'O) { return RSL_ALG_ID_A5_4; } + case ('20'O) { return RSL_ALG_ID_A5_5; } + case ('40'O) { return RSL_ALG_ID_A5_6; } + case ('80'O) { return RSL_ALG_ID_A5_7; } + case else { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Unexpected Encryption Algorithm: " & oct2str(alg_bssmap)); return RSL_ALG_ID_A5_0; + } } }