Change in libosmocore[master]: coding: Always initialize bit counters in gsm0503_pdtch_egprs_decode().

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Alexander Chemeris gerrit-no-reply at lists.osmocom.org
Sat Jul 14 19:13:11 UTC 2018


Alexander Chemeris has uploaded this change for review. ( https://gerrit.osmocom.org/9996


Change subject: coding: Always initialize bit counters in gsm0503_pdtch_egprs_decode().
......................................................................

coding: Always initialize bit counters in gsm0503_pdtch_egprs_decode().

Previsouly there were a lot of valid code paths which returned from the function
before setting bit counters which led to bogus BER output in osmo-bts-trx logs
when those code paths were hit.

Change-Id: I4722cae3794ccbb12001113c991d9cf345a52a96
---
M src/coding/gsm0503_coding.c
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/96/9996/1

diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index 2eb8cba..6be4001 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -938,6 +938,9 @@
 	struct egprs_cps cps;
 	union gprs_rlc_ul_hdr_egprs *hdr;
 
+	if (n_errors) *n_errors = 0;
+	if (n_bits_total) *n_bits_total = 0;
+
 	if ((nbits != GSM0503_GPRS_BURSTS_NBITS) &&
 		(nbits != GSM0503_EGPRS_BURSTS_NBITS)) {
 		/* Invalid EGPRS bit length */

-- 
To view, visit https://gerrit.osmocom.org/9996
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4722cae3794ccbb12001113c991d9cf345a52a96
Gerrit-Change-Number: 9996
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Chemeris <Alexander.Chemeris at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180714/aab8b4e9/attachment.htm>


More information about the gerrit-log mailing list