aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-04-16 13:23:50 +0200
committerStefan Sperling <ssperling@sysmocom.de>2018-04-16 13:23:50 +0200
commit53f36ba1cc42ee99a77cf31777cc87e31b283718 (patch)
tree43c1ca521bfcaf6faeaa077e9f649450f0f8c908 /openbsc/src
parent77c6e48cb9f9fa69ad23752759415a8438964601 (diff)
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. This is a port of osmo-bsc commit 53d40e078e9df20103b7ed26daa936720c9dec83 Related: OS#2591 Change-Id: I2f892b998eb8119e623c1d87ffe865b48f7d5a87
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/libbsc/acc_ramp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/acc_ramp.c b/openbsc/src/libbsc/acc_ramp.c
index 08810b5b8..9b3f90b51 100644
--- a/openbsc/src/libbsc/acc_ramp.c
+++ b/openbsc/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);
}