diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-19 17:37:48 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-30 21:24:09 +0100 |
commit | 17b0d83a1f1a153b21b198f101294c8ed9e172ac (patch) | |
tree | 0cd522f1ed4ec659bddaf36eaff8623c94c3eeb5 /src/gprs_rlcmac_ts_alloc.cpp | |
parent | ba5543fbf3f31819d63d4d6c019fe08893c32889 (diff) |
pdch: Move enable/disable into the PDCH code
When a PDCH is disabled all resources should be freed. This is
currently not possible as the PDCH does not know where it belongs
to. On top of that the list (and other resources) should be
properly initialized on construction so that disable() is idempotent
and does not check if it was disabled. During the re-factoring I
noticed that during a sysmobts re-start some resources are not
freed. I left a warning in the code to resolve this issue later.
Diffstat (limited to 'src/gprs_rlcmac_ts_alloc.cpp')
-rw-r--r-- | src/gprs_rlcmac_ts_alloc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index e5ca5b65..bf69296d 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -104,7 +104,7 @@ static int find_enabled_pdch(struct gprs_rlcmac_trx *trx, const uint8_t start_ts struct gprs_rlcmac_pdch *pdch; pdch = &trx->pdch[ts]; - if (!pdch->enable) { + if (!pdch->is_enabled()) { LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, because " "not enabled\n", ts); continue; @@ -265,7 +265,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, for (ts = 0, i = 0; ts < 8; ts++) { pdch = &tbf->trx->pdch[ts]; /* check if enabled */ - if (!pdch->enable) { + if (!pdch->is_enabled()) { LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, because " "not enabled\n", ts); /* increase window for Type 1 */ @@ -421,7 +421,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, for (ts = tx_win_min, i = 0; i < tx_range; ts = (ts + 1) & 7) { pdch = &tbf->trx->pdch[ts]; /* check if enabled */ - if (!pdch->enable) { + if (!pdch->is_enabled()) { LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, " "because not enabled\n", ts); continue; @@ -493,7 +493,7 @@ int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, for (ts = tx_win_min, i = 0; i < tx_range; ts = (ts + 1) & 7) { pdch = &tbf->trx->pdch[ts]; /* check if enabled */ - if (!pdch->enable) { + if (!pdch->is_enabled()) { LOGP(DRLCMAC, LOGL_DEBUG, "- Skipping TS %d, " "because not enabled\n", ts); continue; |