falconia has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/38332?usp=email )


Change subject: trau 8k decode: set fr->type correctly
......................................................................

trau 8k decode: set fr->type correctly

osmo_trau_frame_decode_16k() sets fr->type to the correct OSMO_TRAU*
frame type before tail-calling the respective decoding function;
osmo_trau_frame_decode_8k() was failing to do likewise, resulting
in fr->type not being set correctly.  Fix it.

Change-Id: I3160e458e49b8c439c6483d6141623ba68866173
---
M src/trau/trau_frame.c
1 file changed, 9 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/32/38332/1

diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c
index 8347303..21e4f00 100644
--- a/src/trau/trau_frame.c
+++ b/src/trau/trau_frame.c
@@ -1484,28 +1484,37 @@
                if (dir == OSMO_TRAU_DIR_UL) {
                        switch (cbits5) {       /* Section 5.2.4.1.1 */
                        case 0x02:
+                               fr->type = OSMO_TRAU8_SPEECH;
                                return decode8_hr(fr, bits, dir);
                        case 0x07:
+                               fr->type = OSMO_TRAU8_DATA;
                                return decode8_data(fr, bits, dir);
                        case 0x0B:
+                               fr->type = OSMO_TRAU8_OAM;
                                return decode8_oam(fr, bits, dir);
                        }
                } else {
                        /* Downlink */
                        switch (cbits5 >> 2) {  /* Section 5.2.4.1.2 */
                        case 0:
+                               fr->type = OSMO_TRAU8_SPEECH;
                                return decode8_hr(fr, bits, dir);
                        case 1:
+                               fr->type = OSMO_TRAU8_DATA;
                                return decode8_data(fr, bits, dir);
                        case 2:
+                               fr->type = OSMO_TRAU8_OAM;
                                return decode8_oam(fr, bits, dir);
                        }
                }
        } else if (is_amr_low(bits)) {
+               fr->type = OSMO_TRAU8_AMR_LOW;
                return decode8_amr_low(fr, bits, dir);
        } else if (is_amr_67(bits)) {
+               fr->type = OSMO_TRAU8_AMR_6k7;
                return decode8_amr_67(fr, bits, dir);
        } else if (is_amr_74(bits)) {
+               fr->type = OSMO_TRAU8_AMR_7k4;
                return decode8_amr_74(fr, bits, dir);
        }


--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38332?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I3160e458e49b8c439c6483d6141623ba68866173
Gerrit-Change-Number: 38332
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <[email protected]>

Reply via email to