[PATCH] osmo-bts[master]: SACCH: fix sending of SI with an enum value > 7

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Feb 8 18:08:36 UTC 2017


Review at  https://gerrit.osmocom.org/1778

SACCH: fix sending of SI with an enum value > 7

In copy_sacch_si_to_lchan(), the variable to hold the bit mask for SI-is-valid
was chosen as uint8_t, and as a result none of the SIs with an enum value >= 8
would ever be sent. Use int for enum value and uint32_t for the bit mask.

Change-Id: I85fa9a50691601bcd103845c6811caa061a39824
Fixes: #1945
---
M src/common/rsl.c
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/78/1778/1

diff --git a/src/common/rsl.c b/src/common/rsl.c
index 7ab43cd..c657b0f 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -687,8 +687,8 @@
 
 	for (i = 0; i < ARRAY_SIZE(rsl_sacch_sitypes); i++) {
 		uint8_t rsl_si = rsl_sacch_sitypes[i];
-		uint8_t osmo_si = osmo_rsl2sitype(rsl_si);
-		uint8_t osmo_si_shifted = (1 << osmo_si);
+		int osmo_si = osmo_rsl2sitype(rsl_si);
+		uint32_t osmo_si_shifted = (1 << osmo_si);
 		if (osmo_si == SYSINFO_TYPE_NONE)
 			continue;
 		if (!(bts->si_valid & osmo_si_shifted)) {

-- 
To view, visit https://gerrit.osmocom.org/1778
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85fa9a50691601bcd103845c6811caa061a39824
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list