laforge submitted this change.
gsm_set_bts_type(): fix switch statement
The switch statement on (bts->type) in this function exhibited
two defects:
1) From the beginning, each unhandled BTS type was listed explicitly,
instead of providing a default case;
2) When Nokia-specific initialization was added in 2015,
the addition was erroneously applied to GSM_BTS_TYPE_BS11
and GSM_BTS_TYPE_UNKNOWN cases, besides the intended case
of GSM_BTS_TYPE_NOKIA_SITE.
Fixes: 56e1766dba1a03e304e51d079e65406542e7887c
Change-Id: Ibf500c373b69a69182885d5e700abc6fb1b03ccd
---
M src/osmo-bsc/bts.c
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 2ec4865..d295bfd 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -742,14 +742,12 @@
INIT_LLIST_HEAD(&bts->rbs2000.is.conn_groups);
INIT_LLIST_HEAD(&bts->rbs2000.con.conn_groups);
break;
- case GSM_BTS_TYPE_BS11:
- case GSM_BTS_TYPE_UNKNOWN:
case GSM_BTS_TYPE_NOKIA_SITE:
/* Set default BTS reset timer */
bts->nokia.bts_reset_timer_cnf = 15;
/* Enable Rx diversity by default, for backward compat */
bts->nokia.rx_diversity = 1;
- case _NUM_GSM_BTS_TYPE:
+ default:
break;
}
To view, visit change 42728. To unsubscribe, or for help writing mail filters, visit settings.