[S] Change in libosmo-abis[master]: rtp2trau_hr16: set D bits correctly
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37150?usp=email ) Change subject: rtp2trau_hr16: set D bits correctly ...................................................................... rtp2trau_hr16: set D bits correctly The original code failed to do the step of osmo_pbit2ubit() for transferring HRv1 payload bits from packed to unpacked form, instead doing the bogon of memcpy()ing the RTP payload directly into tf->d_bits array - fix it. Also set all D bits to zeros in the case of empty payload input - not ideal, but better than transmitting uninitialized memory content. Change-Id: Icb6a21a12fe82f6637f327d45bd843686a90a458 --- M src/trau/trau_rtp_conv.c 1 file changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/50/37150/1 diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index 4a62cc0..bad63ac 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -425,7 +425,9 @@ tf->ufi = 1; /* CRC is computed by TRAU frame encoder */ if (data_len) - memcpy(tf->d_bits, data, GSM_HR_BYTES); + osmo_pbit2ubit(tf->d_bits, data, 112); + else + memset(tf->d_bits, 0, 112); return 0; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37150?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Icb6a21a12fe82f6637f327d45bd843686a90a458 Gerrit-Change-Number: 37150 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon@freecalypso.org> Gerrit-MessageType: newchange
participants (1)
-
falconia