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
Thu Mar 21 16:01:23 UTC 2019


Max has submitted this change and it was merged. ( 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(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved



diff --git a/src/encoding.cpp b/src/encoding.cpp
index ad53b0b..e21a7fc 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: merged
Gerrit-Change-Id: I54482790e1cf3cb13a635a99a481250576deabaf
Gerrit-Change-Number: 13238
Gerrit-PatchSet: 4
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Daniel Willmann <dwillmann at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190321/f816d021/attachment.htm>


More information about the gerrit-log mailing list