diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-04-10 16:25:26 +0200 |
---|---|---|
committer | Stefan Sperling <ssperling@sysmocom.de> | 2018-04-10 16:25:26 +0200 |
commit | 53d40e078e9df20103b7ed26daa936720c9dec83 (patch) | |
tree | b4737f274c40b05c47d009a02035f6fc081e7ccc /src/libbsc | |
parent | c0587d0da26ab1ab5bab91219f663ae433e55b59 (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.
Change-Id: I37580f4058f6e3a21d338234b1e22ea46f9538c6
Related: OS#2591
Diffstat (limited to 'src/libbsc')
-rw-r--r-- | src/libbsc/acc_ramp.c | 6 |
1 files 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); } |