From 53d40e078e9df20103b7ed26daa936720c9dec83 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Tue, 10 Apr 2018 16:25:26 +0200 Subject: only log actual access control class ramping changes Silence log messages about no-op changes to access granted to access control classes. For example, these always occur while configuration files are being loaded. Change-Id: I37580f4058f6e3a21d338234b1e22ea46f9538c6 Related: OS#2591 --- src/libbsc/acc_ramp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libbsc/acc_ramp.c b/src/libbsc/acc_ramp.c index 7cace4bf9..5d358426b 100644 --- a/src/libbsc/acc_ramp.c +++ b/src/libbsc/acc_ramp.c @@ -42,14 +42,16 @@ static bool acc_is_enabled(struct gsm_bts *bts, unsigned int acc) static void allow_one_acc(struct acc_ramp *acc_ramp, unsigned int acc) { OSMO_ASSERT(acc >= 0 && acc <= 9); - LOGP(DRSL, LOGL_DEBUG, "(bts=%d) ACC RAMP: allowing Access Control Class %u\n", acc_ramp->bts->nr, acc); + if (acc_ramp->barred_accs & (1 << acc)) + LOGP(DRSL, LOGL_DEBUG, "(bts=%d) ACC RAMP: allowing Access Control Class %u\n", acc_ramp->bts->nr, acc); acc_ramp->barred_accs &= ~(1 << acc); } static void barr_one_acc(struct acc_ramp *acc_ramp, unsigned int acc) { OSMO_ASSERT(acc >= 0 && acc <= 9); - LOGP(DRSL, LOGL_DEBUG, "(bts=%d) ACC RAMP: barring Access Control Class %u\n", acc_ramp->bts->nr, acc); + if ((acc_ramp->barred_accs & (1 << acc)) == 0) + LOGP(DRSL, LOGL_DEBUG, "(bts=%d) ACC RAMP: barring Access Control Class %u\n", acc_ramp->bts->nr, acc); acc_ramp->barred_accs |= (1 << acc); } -- cgit v1.2.1