aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-07-04 11:35:16 +0200
committerHarald Welte <laforge@osmocom.org>2020-07-14 23:54:34 +0200
commitc66fd3d92815821b56583cae4ac4a02ce95e4411 (patch)
tree6b4ff50643c2768577eac5f576a5db6973d52016
parent574efd99f8b4b27959d2a4b3fd45751da356029b (diff)
Don't print 'bogus channel load sample' message if total == 0
-rw-r--r--src/osmo-bsc/chan_alloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/osmo-bsc/chan_alloc.c b/src/osmo-bsc/chan_alloc.c
index f23a982a1..9b80df3f5 100644
--- a/src/osmo-bsc/chan_alloc.c
+++ b/src/osmo-bsc/chan_alloc.c
@@ -203,9 +203,11 @@ bts_update_t3122_chan_load(struct gsm_bts *bts)
}
/* Check for invalid samples (shouldn't happen). */
- if (total == 0 || used > total) {
+ if (used > total) {
LOG_BTS(bts, DRLL, LOGL_NOTICE, "bogus channel load sample (used=%"PRIu64" / total=%"PRIu32")\n",
used, total);
+ }
+ if (total == 0 || used > total) {
bts->T3122 = 0; /* disable override of network-wide default value */
bts->chan_load_samples_idx = 0; /* invalidate other samples collected so far */
return;