<p>Max has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13238">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Fix TA index encoder<br><br>The TAI is described as { 0 | 1 < TIMING_ADVANCE_INDEX : bit (4) > } in<br>3GPP TS 44.018 ยง10.5.2.16.1 so it should be encoded with if-else.<br><br>Change-Id: I54482790e1cf3cb13a635a99a481250576deabaf<br>---<br>M src/encoding.cpp<br>1 file changed, 6 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/38/13238/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/encoding.cpp b/src/encoding.cpp</span><br><span>index e81ff42..55838fb 100644</span><br><span>--- a/src/encoding.cpp</span><br><span>+++ b/src/encoding.cpp</span><br><span>@@ -117,13 +117,13 @@</span><br><span> {</span><br><span>      int rc;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-     if (tai < 0) /* No TIMING_ADVANCE_INDEX: */</span><br><span style="color: hsl(120, 100%, 40%);">+        if (tai < 0) { /* No TIMING_ADVANCE_INDEX: */</span><br><span>             SET_0(dest);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    /* TIMING_ADVANCE_INDEX: */</span><br><span style="color: hsl(0, 100%, 40%);">-     SET_1(dest);</span><br><span style="color: hsl(0, 100%, 40%);">-    rc = bitvec_set_u64(dest, tai, 4, false);</span><br><span style="color: hsl(0, 100%, 40%);">-       CHECK(rc);</span><br><span style="color: hsl(120, 100%, 40%);">+    } else { /* TIMING_ADVANCE_INDEX: */</span><br><span style="color: hsl(120, 100%, 40%);">+          SET_1(dest);</span><br><span style="color: hsl(120, 100%, 40%);">+          rc = bitvec_set_u64(dest, tai, 4, false);</span><br><span style="color: hsl(120, 100%, 40%);">+             CHECK(rc);</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span> </span><br><span>        return 0;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13238">change 13238</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13238"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I54482790e1cf3cb13a635a99a481250576deabaf </div>
<div style="display:none"> Gerrit-Change-Number: 13238 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Max <msuraev@sysmocom.de> </div>