<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/24211">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ul_tbf: Fix accessing zeroed block when checking if transfer is complete<br><br>The logic checking whether the UL TBF had already been sent all the data<br>(and hence was marked as finished and requesting UL ACK to be sent) was<br>not taking into account the case where there was still no valid block<br>stored, ie. when the first received UL data block was discarded for some<br>reason (ex: because TLLI was not set during content resolution).<br><br>Related: OS#1940<br>Change-Id: I739e67ae1bb40555a362170f26fb98ac69caabb2<br>---<br>M src/tbf_ul.cpp<br>1 file changed, 3 insertions(+), 2 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/11/24211/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp</span><br><span>index e92a920..231ed06 100644</span><br><span>--- a/src/tbf_ul.cpp</span><br><span>+++ b/src/tbf_ul.cpp</span><br><span>@@ -528,7 +528,8 @@</span><br><span> </span><br><span>  /* Check if we already received all data TBF had to send: */</span><br><span>         if (this->state_is(GPRS_RLCMAC_FLOW) /* still in flow state */</span><br><span style="color: hsl(0, 100%, 40%);">-        && this->m_window.v_q() == this->m_window.v_r()) { /* if complete */</span><br><span style="color: hsl(120, 100%, 40%);">+    && this->m_window.v_q() == this->m_window.v_r() /* if complete */</span><br><span style="color: hsl(120, 100%, 40%);">+       && block->len) { /* if there was ever a last block received */</span><br><span>           LOGPTBFUL(this, LOGL_DEBUG,</span><br><span>                    "No gaps in received block, last block: BSN=%d CV=%d\n",</span><br><span>                           rdbi->bsn, rdbi->cv);</span><br><span>@@ -542,7 +543,7 @@</span><br><span> </span><br><span>      /* If TLLI is included or if we received half of the window, we send</span><br><span>          * an ack/nack */</span><br><span style="color: hsl(0, 100%, 40%);">-       maybe_schedule_uplink_acknack(rlc, rdbi->cv == 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ maybe_schedule_uplink_acknack(rlc, block->len && rdbi->cv == 0);</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/c/osmo-pcu/+/24211">change 24211</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/osmo-pcu/+/24211"/><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-Change-Id: I739e67ae1bb40555a362170f26fb98ac69caabb2 </div>
<div style="display:none"> Gerrit-Change-Number: 24211 </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>