diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2023-04-04 02:31:35 +0700 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2023-04-05 19:05:56 +0000 |
commit | a60d74ba9c660612833b2634435ce4f0714c7b34 (patch) | |
tree | d1707315682bf220ff78b20684bb22930d2785d2 | |
parent | b8e115c646e9a39e6cd4290b7e95056370afdb50 (diff) |
si2quater: bts_uarfcn_add(): check if already added first
This way we print the proper message if the given UARFCN is already
added, no matter if the UTRAN neighbour list is full or not.
Change-Id: Ife83023f6a9e28d77e44e4757457d4d1c879e78f
Related: SYS#6401
-rw-r--r-- | src/osmo-bsc/system_information.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 97294f400..c6928d606 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -302,12 +302,12 @@ int bts_uarfcn_add(struct gsm_bts *bts, uint16_t arfcn, uint16_t scramble, bool *ual = bts->si_common.data.uarfcn_list, *scl = bts->si_common.data.scramble_list; - if (len == MAX_EARFCN_LIST) - return -ENOMEM; - if (pos >= 0) return -EADDRINUSE; + if (len == MAX_EARFCN_LIST) + return -ENOMEM; + /* find the suitable position for arfcn if any */ pos = uarfcn_sc_pos(bts, arfcn, SC_BOUND); i = (pos < 0) ? len : pos; |