Change in osmo-pcu[master]: Fix TA index encoder

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/.

Max gerrit-no-reply at lists.osmocom.org
Wed Mar 13 15:01:41 UTC 2019


Max has uploaded this change for review. ( https://gerrit.osmocom.org/13238


Change subject: Fix TA index encoder
......................................................................

Fix TA index encoder

The TAI is described as { 0 | 1 < TIMING_ADVANCE_INDEX : bit (4) > } in
3GPP TS 44.018 §10.5.2.16.1 so it should be encoded with if-else.

Change-Id: I54482790e1cf3cb13a635a99a481250576deabaf
---
M src/encoding.cpp
1 file changed, 6 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/38/13238/1

diff --git a/src/encoding.cpp b/src/encoding.cpp
index e81ff42..55838fb 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -117,13 +117,13 @@
 {
 	int rc;
 
-	if (tai < 0) /* No TIMING_ADVANCE_INDEX: */
+	if (tai < 0) { /* No TIMING_ADVANCE_INDEX: */
 		SET_0(dest);
-
-	/* TIMING_ADVANCE_INDEX: */
-	SET_1(dest);
-	rc = bitvec_set_u64(dest, tai, 4, false);
-	CHECK(rc);
+	} else { /* TIMING_ADVANCE_INDEX: */
+		SET_1(dest);
+		rc = bitvec_set_u64(dest, tai, 4, false);
+		CHECK(rc);
+	}
 
 	return 0;
 }

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I54482790e1cf3cb13a635a99a481250576deabaf
Gerrit-Change-Number: 13238
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190313/14cdb8fa/attachment.htm>


More information about the gerrit-log mailing list