diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-02-08 19:04:44 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-02-08 19:34:06 +0100 |
commit | 16312669937281a7785bf069bbf428bfdbadcd60 (patch) | |
tree | 4e4ce2026814398f61f052bc8ce00fc7d8b46412 | |
parent | 3c144069daf898105b54d99703f398f52c777a10 (diff) |
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
-rw-r--r-- | src/common/rsl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c index 7ab43cd1..c657b0f6 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -687,8 +687,8 @@ static void copy_sacch_si_to_lchan(struct gsm_lchan *lchan) 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)) { |