<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/21712">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gsm: append_eutran_neib_cell: Fix SI2quater EARFCN list<br><br>Commit bd6e7a9f2dd5d4e881a0a21ebdb29b7a76ebdc9a did the initial porting<br>of rest_octet APIs from osmo-bsc, but introduced a bug when moving<br>bts->e_offset to a generic pointer independent of bts structure.<br>As a result, using this API from osmo-bsc makes gsm0408 unit test fail<br>due to bad encoding of several EARFCNs in si2quater.<br><br>Fixes: bd6e7a9f2dd5d4e881a0a21ebdb29b7a76ebdc9a<br>Change-Id: I2bf5635b8536b11d69774d17ac1908019633e3af<br>---<br>M src/gsm/gsm48_rest_octets.c<br>1 file changed, 2 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/12/21712/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c</span><br><span>index 5c7d77a..1f9c2b5 100644</span><br><span>--- a/src/gsm/gsm48_rest_octets.c</span><br><span>+++ b/src/gsm/gsm48_rest_octets.c</span><br><span>@@ -64,6 +64,7 @@</span><br><span>                                     uint8_t budget)</span><br><span> {</span><br><span>      unsigned i, skip = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ size_t offset = *e_offset;</span><br><span>   int16_t rem = budget - 6; /* account for mandatory stop bit and THRESH_E-UTRAN_high */</span><br><span>       uint8_t earfcn_budget;</span><br><span> </span><br><span>@@ -94,7 +95,7 @@</span><br><span>       /* now we can proceed with actually adding EARFCNs within adjusted budget limit */</span><br><span>   for (i = 0; i < e->length; i++) {</span><br><span>              if (e->arfcn[i] != OSMO_EARFCN_INVALID) {</span><br><span style="color: hsl(0, 100%, 40%);">-                    if (skip < *e_offset) {</span><br><span style="color: hsl(120, 100%, 40%);">+                    if (skip < offset) {</span><br><span>                              skip++; /* ignore EARFCNs added on previous calls */</span><br><span>                         } else {</span><br><span>                             earfcn_budget = 17; /* compute budget per-EARFCN */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/21712">change 21712</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/c/libosmocore/+/21712"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2bf5635b8536b11d69774d17ac1908019633e3af </div>
<div style="display:none"> Gerrit-Change-Number: 21712 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>