aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/rest_octets.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-05-15 12:02:29 +0200
committerMax <msuraev@sysmocom.de>2017-05-15 15:13:01 +0200
commit845a3a4c594f56fc754eae3b261675b460aec2ac (patch)
tree35990cab7d93defbd677f64264e1a04f365b6e1e /openbsc/src/libbsc/rest_octets.c
parentf39d03ad21d8120af847603d9b2ead71b8c4ba43 (diff)
SI2quater: fix EARFCN inclusion check
Previously only the existance of bts->si_common.si2quater_neigh_list was checked but not the actual number of EARFCNs in it. Fix it by using si2q_earfcn_count() and adjust tests accordingly. While at it - reformat tests to include extra information. The correctness was checked manually by inspecting GSMTAP output. Change-Id: Ic4fb2a9e870db66cac58b1e8d113587b30d64ce2 Related: RT#8792
Diffstat (limited to 'openbsc/src/libbsc/rest_octets.c')
-rw-r--r--openbsc/src/libbsc/rest_octets.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c
index 950e57006..a6fdf46fe 100644
--- a/openbsc/src/libbsc/rest_octets.c
+++ b/openbsc/src/libbsc/rest_octets.c
@@ -379,14 +379,13 @@ int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts)
/* No GPRS_3G_MEASUREMENT Parameters Descr. */
bitvec_set_bit(&bv, 0);
- if (&bts->si_common.si2quater_neigh_list) { /* FIXME: use si2q_earfcn_count() in if */
+ if (si2q_earfcn_count(&bts->si_common.si2quater_neigh_list)) {
append_earfcn(&bv, bts, SI2Q_MAX_LEN - bv.cur_bit);
/* FIXME: remove following check once multiple SI2q are properly supported */
if ((bts->e_offset != si2q_earfcn_count(&bts->si_common.si2quater_neigh_list)) ||
si2q_earfcn_count(&bts->si_common.si2quater_neigh_list) > 5)
return -ENOMEM;
-
} else {
/* No Additions in Rel-5: */
bitvec_set_bit(&bv, L);