osmith submitted this change.
gsm0808_dec_channel_type: fix dec of ch_rate_type
According to 3GPP TS 48.008 V16.0.0 ยง 3.2.2.11, the "Channel and rate
type" fills the whole octet 4, so don't cut it off.
This fixes decoding of e.g. GSM0808_SIGN_FULL_PREF_NO_CHANGE, which I
noticed while writing a test.
Related: OS#5911
Change-Id: Ib5fba18eb82736c4f52f315ae1197159b7090e69
---
M src/gsm/gsm0808_utils.c
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index 11e86b8..d8c275a 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -573,7 +573,7 @@
ct->ch_indctr = (*elem) & 0x0f;
elem++;
- ct->ch_rate_type = (*elem) & 0x0f;
+ ct->ch_rate_type = *elem;
elem++;
switch (ct->ch_indctr) {
To view, visit change 31408. To unsubscribe, or for help writing mail filters, visit settings.