Change in osmo-pcu[master]: sched: Fix scheduling UL TBF not matching conditions

pespin gerrit-no-reply at lists.osmocom.org
Wed Mar 24 18:12:10 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/23487 )


Change subject: sched: Fix scheduling UL TBF not matching conditions
......................................................................

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
---
M src/gprs_rlcmac_sched.cpp
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/87/23487/1

diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index c63ed6e..c54f533 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -87,7 +87,7 @@
 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 @@
 			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) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/23487
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: If6dccec86c7a655bf1c62f333cfbc8d2c507c94f
Gerrit-Change-Number: 23487
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210324/945dac6f/attachment.htm>


More information about the gerrit-log mailing list