[MERGED] 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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Feb 8 19:55:03 UTC 2017


Harald Welte has submitted this change and it was merged.

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


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.

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

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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: merged
Gerrit-Change-Id: I85fa9a50691601bcd103845c6811caa061a39824
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list