sched: Fix scheduling UL TBF not matching conditions

With previous code, a skipped TBF could be returned despite not matching
the conditions, since at the end of the loop the tbf pointer was
returned.

Related: OS#5020
Change-Id: If6dccec86c7a655bf1c62f333cfbc8d2c507c94f
This commit is contained in:
Pau Espin 2021-03-24 17:06:15 +01:00
parent 56f223d8d1
commit 107e94c9f8
1 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ states? */
static struct gprs_rlcmac_ul_tbf *sched_select_uplink(uint8_t trx, uint8_t ts, uint32_t fn,
uint8_t block_nr, struct gprs_rlcmac_pdch *pdch, bool require_gprs_only)
{
struct gprs_rlcmac_ul_tbf *tbf = NULL;
struct gprs_rlcmac_ul_tbf *tbf;
uint8_t i, tfi;
/* select uplink resource */
@ -114,10 +114,10 @@ static struct gprs_rlcmac_ul_tbf *sched_select_uplink(uint8_t trx, uint8_t ts, u
block_nr, tbf->m_usf[ts], tfi);
/* next TBF to handle resource is the next one */
pdch->next_ul_tfi = (tfi + 1) & 31;
break;
return tbf;
}
return tbf;
return NULL;
}
struct msgb *sched_app_info(struct gprs_rlcmac_tbf *tbf) {