From 17b0d83a1f1a153b21b198f101294c8ed9e172ac Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 19 Oct 2013 17:37:48 +0200 Subject: 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. --- tests/alloc/AllocTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index 3b75763a..2117b11a 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -48,8 +48,8 @@ static void test_alloc_a(gprs_rlcmac_tbf_direction dir, const int count) bts.alloc_algorithm = alloc_algorithm_a; struct gprs_rlcmac_trx *trx = &bts.trx[0]; - trx->pdch[2].enable = 1; - trx->pdch[3].enable = 1; + trx->pdch[2].enable(); + trx->pdch[3].enable(); /** * Currently alloc_a will only allocate from the first -- cgit v1.2.3