Review at https://gerrit.osmocom.org/7722
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
---
M src/libbsc/acc_ramp.c
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/22/7722/1
diff --git a/src/libbsc/acc_ramp.c b/src/libbsc/acc_ramp.c
index 7cace4b..5d35842 100644
--- a/src/libbsc/acc_ramp.c
+++ b/src/libbsc/acc_ramp.c
@@ -42,14 +42,16 @@
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);
}
--
To view, visit https://gerrit.osmocom.org/7722
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I37580f4058f6e3a21d338234b1e22ea46f9538c6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling <[email protected]>