aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-02-15 18:46:39 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-02-15 18:47:32 +0100
commitf802f7fd7aec1d91084231a80bbce6f2ed7bd299 (patch)
tree5284bf347ab115f60a6e859d7a368f04c71e947d
parent97d110e3cffcceaee920fa21dcff694af2fa33e3 (diff)
bts chan_load: ignore unusable BTS
For unconnected BTS, the channel load would report a "bogus channel load sample" every second (on RLL debug). Instead, skip unusable BTS. This follows up on commit 6cee893a0f2c4e53155a2631aff12a5f615b973d / I57e38f6d6ba3b23cc6e1f9520b90261dbb1f1cec 'Make "waiting indicator" of IMMEDIATE ASSIGN REJECT dynamic.' Change-Id: I627fe10e1f5c1f2f23745c906320871024b5c8c3
-rw-r--r--src/libbsc/chan_alloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index 500ad5958..42a9e7393 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -606,6 +606,11 @@ bts_update_t3122_chan_load(struct gsm_bts *bts)
static const uint8_t max_wait_ind = 128; /* max wait ~2 minutes */
int i;
+ /* Ignore BTS that are not in operation, in order to not flood the log with "bogus channel load"
+ * messages */
+ if (!trx_is_usable(bts->c0))
+ return;
+
/* Sum up current load across all channels. */
memset(&pl, 0, sizeof(pl));
bts_chan_load(&pl, bts);