aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac.cpp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-19 17:37:48 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-30 21:24:09 +0100
commit17b0d83a1f1a153b21b198f101294c8ed9e172ac (patch)
tree0cd522f1ed4ec659bddaf36eaff8623c94c3eeb5 /src/gprs_rlcmac.cpp
parentba5543fbf3f31819d63d4d6c019fe08893c32889 (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.cpp')
-rw-r--r--src/gprs_rlcmac.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gprs_rlcmac.cpp b/src/gprs_rlcmac.cpp
index 77264816..e83de21f 100644
--- a/src/gprs_rlcmac.cpp
+++ b/src/gprs_rlcmac.cpp
@@ -149,7 +149,7 @@ int tfi_find_free(struct gprs_rlcmac_bts *bts, enum gprs_rlcmac_tbf_direction di
for (trx = trx_from; trx <= trx_to; trx++) {
for (ts = 0; ts < 8; ts++) {
pdch = &bts->trx[trx].pdch[ts];
- if (!pdch->enable)
+ if (!pdch->is_enabled())
continue;
break;
}
@@ -205,7 +205,7 @@ int sba_alloc(struct gprs_rlcmac_bts *bts,
for (trx = 0; trx < 8; trx++) {
for (ts = 0; ts < 8; ts++) {
pdch = &bts->trx[trx].pdch[ts];
- if (!pdch->enable)
+ if (!pdch->is_enabled())
continue;
break;
}