aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2020-06-06 00:41:42 +0300
committerKirill Zakharenko <earwin@gmail.com>2020-06-06 02:22:34 +0300
commit8dee5b7aacd3fea3186208e24c72592ede2b1382 (patch)
tree5879f3e77029d62cb6dacde8e4586004042a7d75
parent731b6e1ae3ea8f01e34139478bb8e331da103db7 (diff)
chan_alloc: Fix calculation of total available channels.
-rw-r--r--src/osmo-bsc/chan_alloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index 8b6e28cb8..226984d56 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -58,6 +58,11 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts)
if (!nm_is_running(&ts->mo.nm_state))
continue;
+ /* skip timeslots which are not yet initialized or which
+ * have been de-initialized due to RSL link going down */
+ if (ts->fi->state == TS_ST_NOT_INITIALIZED)
+ continue;
+
/* Dynamic timeslots have to be counted separately
* when not in TCH/F or TCH/H mode because they don't
* have an lchan's allocated to them. At the same time,