fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32248 )
Change subject: si2quater: bts_uarfcn_add(): modify existsing UARFCNs ......................................................................
si2quater: bts_uarfcn_add(): modify existsing UARFCNs
Do not print an error, modify the existsing UARFCNs instead.
Change-Id: Iadc884aa8968e2dc01adf26ba68ba9597fa05d94 Related: SYS#6401 (cherry picked from commit 117c699107a08dc286f22fd983365c6c0d9714ef) --- M src/osmo-bsc/bts_vty.c M src/osmo-bsc/system_information.c M tests/si2quater_neighbor_list.vty 3 files changed, 28 insertions(+), 9 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 50e49b8..8fb7bea 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -2127,10 +2127,6 @@ vty_out(vty, "%% Warning: not enough space in SI2quater for a given UARFCN (%u, %u)%s", arfcn, scramble, VTY_NEWLINE); return CMD_WARNING; - case -EADDRINUSE: - vty_out(vty, "%% Unable to add UARFCN: (%u, %u) is already added%s", - arfcn, scramble, VTY_NEWLINE); - return CMD_WARNING; }
return CMD_SUCCESS; diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 7687c90..1c69bb8 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -302,8 +302,13 @@ *ual = bts->si_common.data.uarfcn_list, *scl = bts->si_common.data.scramble_list;
- if (pos >= 0) - return -EADDRINUSE; + if (pos >= 0) { + LOGP(DRR, LOGL_NOTICE, + "EARFCN (%u, %u) is already in the list, modifying\n", + arfcn, scramble); + scl[pos] = scr; + return 0; + }
if (len == MAX_EARFCN_LIST) return -ENOMEM; diff --git a/tests/si2quater_neighbor_list.vty b/tests/si2quater_neighbor_list.vty index dbb8d2a..ea353f2 100644 --- a/tests/si2quater_neighbor_list.vty +++ b/tests/si2quater_neighbor_list.vty @@ -148,11 +148,16 @@ ... !si2quater neighbor-list
-OsmoBSC(config-net-bts)# ### Adding duplicate UARFCN is not allowed +OsmoBSC(config-net-bts)# ### UARFCN add command: UARFCN already exists OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 111 511 1 -% Unable to add UARFCN: (111, 511) is already added OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 111 511 0 -% Unable to add UARFCN: (111, 511) is already added +OsmoBSC(config-net-bts)# show running-config +... + bts 0 +... !si2quater neighbor-list + si2quater neighbor-list add uarfcn 111 511 0 + si2quater neighbor-list add uarfcn 111 211 1 +... !si2quater neighbor-list
OsmoBSC(config-net-bts)# ### FIXME: UARFCN 0 cannot be added