aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-03-14 17:44:40 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-03-14 17:59:41 +0100
commit83348bcfbf91424e11baa3f8792ce4939bec63df (patch)
tree1d8903e1ae3d3e1f1cd43fcbb012909ce9672d82 /library
parent8e58f596dc4d9a27932b02cbfd14f722efd3fc9c (diff)
fix cell identifier generation in ttcn3 paging tests
The cell identifier used by the paging tests is 001-01, i.e. uses a 2-digit MNC. With the introduction of 3-digit MNC support in osmo-bsc, the paging tests became incompatible with a osmo-bsc config with: network country code 1 mobile network code 1 Explicitly declare a Cell_Identity with 2-digit MNC (includes an 'f'). Also, fix f_enc_mcc_mnc to properly encode 2-digit MNC values. Related: OS#2847 Change-Id: Ide5228b403e43de8649b6eda18749ea2a9f592a9
Diffstat (limited to 'library')
-rw-r--r--library/BSSMAP_Templates.ttcn6
1 files changed, 5 insertions, 1 deletions
diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 77ff7e4f..5d2bff26 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -665,7 +665,11 @@ template BSSMAP_FIELD_CellIdentificationList ts_BSSMAP_CIL_noCell := {
}
private function f_enc_mcc_mnc(GsmMcc mcc, GsmMnc mnc) return OCT3 {
- return hex2oct(mcc[1] & mcc[0] & mnc[2] & mcc[2] & mnc[1] & mnc[0]);
+ if (mnc[0] == 'f'H) {
+ return hex2oct(mcc[1] & mcc[0] & mnc[0] & mcc[2] & mnc[2] & mnc[1]);
+ } else {
+ return hex2oct(mcc[1] & mcc[0] & mnc[2] & mcc[2] & mnc[1] & mnc[0]);
+ }
}
template BSSMAP_FIELD_CellIdentification_CGI ts_BSSMAP_CI_CGI(GsmMcc mcc, GsmMnc mnc, GsmLac lac, GsmCellId ci) := {