Change in libosmo-abis[master]: trau_frame: Fix computation of odd parity while encoding HR frames
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/19538 ) Change subject: trau_frame: Fix computation of odd parity while encoding HR frames .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/19538 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I37af702ba020a90a820bae84cb603e187ebbacb5 Gerrit-Change-Number: 19538 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 06 Aug 2020 10:05:05 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-abis[master]: trau_frame: Fix computation of odd parity while encoding HR frames
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/19538 ) Change subject: trau_frame: Fix computation of odd parity while encoding HR frames .. trau_frame: Fix computation of odd parity while encoding HR frames division modulo 1 is always 0, and hence we always returned '1' as parity bit. Instead, we need to check if the LSB is set in order to know if the number of bits is odd or even. Change-Id: I37af702ba020a90a820bae84cb603e187ebbacb5 Closes: CID#211594 --- M src/trau/trau_frame.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c index 0a8faf9..1159bb1 100644 --- a/src/trau/trau_frame.c +++ b/src/trau/trau_frame.c @@ -817,7 +817,7 @@ sum++; } - if (sum % 1) + if (sum & 1) return 0; else return 1; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/19538 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I37af702ba020a90a820bae84cb603e187ebbacb5 Gerrit-Change-Number: 19538 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged
Change in libosmo-abis[master]: trau_frame: Fix computation of odd parity while encoding HR frames
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/19538 ) Change subject: trau_frame: Fix computation of odd parity while encoding HR frames .. trau_frame: Fix computation of odd parity while encoding HR frames division modulo 1 is always 0, and hence we always returned '1' as parity bit. Instead, we need to check if the LSB is set in order to know if the number of bits is odd or even. Change-Id: I37af702ba020a90a820bae84cb603e187ebbacb5 Closes: CID#211594 --- M src/trau/trau_frame.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/38/19538/1 diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c index 0a8faf9..1159bb1 100644 --- a/src/trau/trau_frame.c +++ b/src/trau/trau_frame.c @@ -817,7 +817,7 @@ sum++; } - if (sum % 1) + if (sum & 1) return 0; else return 1; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/19538 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I37af702ba020a90a820bae84cb603e187ebbacb5 Gerrit-Change-Number: 19538 Gerrit-PatchSet: 1 Gerrit-Owner: laforge Gerrit-MessageType: newchange