aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2020-05-17 00:55:01 +0300
committerAlexander Chemeris <Alexander.Chemeris@gmail.com>2020-05-18 00:22:39 +0300
commit25b9d6ade10714f7a20430ed2874bf646a747c30 (patch)
tree9a6d35be0ee7350a88cfc2ed81c4d88fad50f01f
parentef5ee6407244bee70a13cc3563080675f8e97166 (diff)
stats: Correctly count lchans under BORKEN/NOT_INITIALIZED TS.
lchans under a BORKEN/NOT_INITIALIZED 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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index 27c49cd0e..eeb6b0a1b 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -87,6 +87,14 @@ void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts)
pl->total++;
+ /* lchans under a BORKEN/NOT_INITIALIZED TS should
+ * be counted as used just as BORKEN lchans under
+ * a normal TS */
+ if (!ts_is_usable(ts)) {
+ pl->used++;
+ continue;
+ }
+
switch (lchan->fi->state) {
case LCHAN_ST_UNUSED:
break;