<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-pcu/+/23487">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sched: Fix scheduling UL TBF not matching conditions<br><br>With previous code, a skipped TBF could be returned despite not matching<br>the conditions, since at the end of the loop the tbf pointer was<br>returned.<br><br>Related: OS#5020<br>Change-Id: If6dccec86c7a655bf1c62f333cfbc8d2c507c94f<br>---<br>M src/gprs_rlcmac_sched.cpp<br>1 file changed, 3 insertions(+), 3 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/87/23487/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp</span><br><span>index c63ed6e..c54f533 100644</span><br><span>--- a/src/gprs_rlcmac_sched.cpp</span><br><span>+++ b/src/gprs_rlcmac_sched.cpp</span><br><span>@@ -87,7 +87,7 @@</span><br><span> static struct gprs_rlcmac_ul_tbf *sched_select_uplink(uint8_t trx, uint8_t ts, uint32_t fn,</span><br><span>     uint8_t block_nr, struct gprs_rlcmac_pdch *pdch, bool require_gprs_only)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-   struct gprs_rlcmac_ul_tbf *tbf = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+        struct gprs_rlcmac_ul_tbf *tbf;</span><br><span>      uint8_t i, tfi;</span><br><span> </span><br><span>  /* select uplink resource */</span><br><span>@@ -114,10 +114,10 @@</span><br><span>                         block_nr, tbf->m_usf[ts], tfi);</span><br><span>           /* next TBF to handle resource is the next one */</span><br><span>            pdch->next_ul_tfi = (tfi + 1) & 31;</span><br><span style="color: hsl(0, 100%, 40%);">-              break;</span><br><span style="color: hsl(120, 100%, 40%);">+                return tbf;</span><br><span>  }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   return tbf;</span><br><span style="color: hsl(120, 100%, 40%);">+   return NULL;</span><br><span> }</span><br><span> </span><br><span> struct msgb *sched_app_info(struct gprs_rlcmac_tbf *tbf) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-pcu/+/23487">change 23487</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/+/23487"/><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: If6dccec86c7a655bf1c62f333cfbc8d2c507c94f </div>
<div style="display:none"> Gerrit-Change-Number: 23487 </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>