aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2014-01-04 15:39:54 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-01-15 10:39:08 +0100
commitfe2dcc8aecf4d2f9bab186e2619507659b85517e (patch)
tree550596ddfe52fc653ea4539626d1bcdf865a2f02
parentf3eec04655ad0ac629950f3891cb97720ab608e5 (diff)
alloc_algorithm_b: Increment 'i', so allocated TS will not exceed tx_range
-rw-r--r--src/gprs_rlcmac_ts_alloc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index 96fc092..e1e2498 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -400,7 +400,7 @@ static int select_ul_slots(gprs_rlcmac_trx *trx,
int i;
uint8_t ts_no;
- for (ts_no = tx_win_min, i = 0; i < tx_range; ts_no = (ts_no + 1) & 7) {
+ for (ts_no = tx_win_min, i = 0; i < tx_range; ts_no = (ts_no + 1) & 7, i++) {
gprs_rlcmac_pdch *pdch = &trx->pdch[ts_no];
/* check if enabled */
@@ -492,7 +492,7 @@ static int select_first_ts(gprs_rlcmac_trx *trx, uint8_t tx_win_min,
{
uint8_t ts_no;
int i;
- for (ts_no = tx_win_min, i = 0; i < tx_range; ts_no = (ts_no + 1) & 7) {
+ for (ts_no = tx_win_min, i = 0; i < tx_range; ts_no = (ts_no + 1) & 7, i++) {
gprs_rlcmac_pdch *pdch = &trx->pdch[ts_no];
/* check if enabled */
if (!pdch->is_enabled()) {