osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/31408 )

Change subject: gsm0808_dec_channel_type: fix dec of ch_rate_type
......................................................................

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(-)

Approvals:
  fixeria: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




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 https://gerrit.osmocom.org/c/libosmocore/+/31408
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib5fba18eb82736c4f52f315ae1197159b7090e69
Gerrit-Change-Number: 31408
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to