aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2020-05-17 00:55:01 +0300
committerlaforge <laforge@osmocom.org>2020-05-19 20:00:32 +0000
commita3af93acc4681f6090d8562d3f2a89fdd0daa301 (patch)
tree42ca56ce3b7841296cedc0caacc4b6bc158981ba
parent43def7493c26f623cdf44640a13716a26f13e0c9 (diff)
stats: Correctly count lchans under BORKEN TS.
lchans under a BORKEN TS should be counted as used just as BORKEN lchans under a normal TS. Change-Id: Ic3dbc6b176d5dcff7ed2589bb875abf93e9f7ab0
-rw-r--r--src/osmo-bsc/chan_alloc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index 27c49cd0e..f23a982a1 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -87,6 +87,13 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts)
pl->total++;
+ /* lchans under a BORKEN TS should be counted
+ * as used just as BORKEN lchans under a normal TS */
+ if (ts->fi->state == TS_ST_BORKEN) {
+ pl->used++;
+ continue;
+ }
+
switch (lchan->fi->state) {
case LCHAN_ST_UNUSED:
break;