This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/20083 )
Change subject: osmo-bsc: fix a crash when receiving a RACH LOAD IND with 0
......................................................................
osmo-bsc: fix a crash when receiving a RACH LOAD IND with 0
Change-Id: Ia395d4ec70107688856ef0cd5daa6124a7da834b
---
M src/osmo-bsc/abis_rsl.c
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/83/20083/1
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 74cc760..550de06 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1713,8 +1713,14 @@
sd.rach_busy_count = rslh->data[4] << 8 | rslh->data[5];
sd.rach_access_count = rslh->data[6] << 8 | rslh->data[7];
/* update stats group */
- busy_percent = (int32_t) sd.rach_busy_count * 100 / (int32_t) sd.rach_slot_count;
- access_percent = (int32_t) sd.rach_access_count * 100 / (int32_t) sd.rach_slot_count;
+ if (sd.rach_slot_count) {
+ access_percent = (int32_t) sd.rach_access_count * 100 / (int32_t) sd.rach_slot_count;
+ busy_percent = (int32_t) sd.rach_busy_count * 100 / (int32_t) sd.rach_slot_count;
+ } else {
+ access_percent = 0;
+ busy_percent = 0;
+ }
+
osmo_stat_item_set(sd.bts->bts_statg->items[BTS_STAT_RACH_BUSY], busy_percent);
osmo_stat_item_set(sd.bts->bts_statg->items[BTS_STAT_RACH_ACCESS], access_percent);
/* dispatch signal */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20083
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ia395d4ec70107688856ef0cd5daa6124a7da834b
Gerrit-Change-Number: 20083
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200911/bfcab7cf/attachment.htm>