fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32251 )
Change subject: si2quater: check return value of osmo_earfcn_del() ......................................................................
si2quater: check return value of osmo_earfcn_del()
Change-Id: I227dad57737721c40a508f67616d9f5003bb1a3e Fixes: CID#313584 --- M src/osmo-bsc/bts_vty.c 1 file changed, 13 insertions(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve msuraev: Looks good to me, but someone else must approve fixeria: Looks good to me, approved
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 0ecb6d6..9ba3ac2 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -2078,7 +2078,9 @@
vty_out(vty, "%% Warning: not enough space in SI2quater (%u/%u used) for a given EARFCN %u%s", bts->si2q_count, SI2Q_MAX_NUM, arfcn, VTY_NEWLINE); - osmo_earfcn_del(e, arfcn); + + if (osmo_earfcn_del(e, arfcn) != 0) + vty_out(vty, "%% Failed to roll-back adding EARFCN %u%s", arfcn, VTY_NEWLINE);
return CMD_WARNING; }