diff options
author | Oliver Smith <osmith@sysmocom.de> | 2023-02-20 12:55:04 +0100 |
---|---|---|
committer | osmith <osmith@sysmocom.de> | 2023-02-21 08:17:42 +0000 |
commit | dcaab85795b10aee7d79fdda90a787868da06d76 (patch) | |
tree | cfe9a8db088b94be47108059c246b1ffddc664a2 | |
parent | 2bb8a1219cd3c3d17a491e334ddbeeb2a32b78ae (diff) |
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
-rw-r--r-- | src/gsm/gsm0808_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 11e86b8a..d8c275a7 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -573,7 +573,7 @@ int gsm0808_dec_channel_type(struct gsm0808_channel_type *ct, ct->ch_indctr = (*elem) & 0x0f; elem++; - ct->ch_rate_type = (*elem) & 0x0f; + ct->ch_rate_type = *elem; elem++; switch (ct->ch_indctr) { |