From c66fd3d92815821b56583cae4ac4a02ce95e4411 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 4 Jul 2020 11:35:16 +0200 Subject: Don't print 'bogus channel load sample' message if total == 0 Change-Id: I857fecc76dc16ba4431f3c0142bb0d798a9f73dc Closes: OS#4614 --- src/osmo-bsc/chan_alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/osmo-bsc') 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; -- cgit v1.2.3