aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-03-24 17:06:15 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2021-03-24 17:12:01 +0100
commit107e94c9f8f2e4205fbf7ce89aec886d42dcc401 (patch)
treeba63ad9a5e1c666d7a374d6d1b68d92ed90e9616
parent56f223d8d11fea94abf714a8a55550e876847722 (diff)
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
-rw-r--r--src/gprs_rlcmac_sched.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index c63ed6e0..c54f533f 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -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) {