aboutsummaryrefslogtreecommitdiffstats
path: root/tests/alloc/AllocTest.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-08 12:53:16 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-16 10:25:14 +0200
commit47a57f6f869f19704bbb993fc157a86fd0c85e58 (patch)
tree81a749e414cea4a732e1eccd513f5548d87488bb /tests/alloc/AllocTest.cpp
parent61205a7e6539b3926c3039e8dcabda6aa9b408ef (diff)
pdch: Manage TFIs per direction
Currently a single bit set is used to maintain a set of used TFI without distinguishing between uplink and downlink. Since the namespaces of UL and DL TFI are separate, this implementation is not correct. This commit changes gprs_rlcmac_pdch to use a separate bit set for each direction. It also replace the corresponding conditional fprintf statement in check_tfi_usage (AllocTest.cpp) by an equivalent OSMO_ASSERT. Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests/alloc/AllocTest.cpp')
-rw-r--r--tests/alloc/AllocTest.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index 9394905e..66bc84f3 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -97,9 +97,8 @@ static void check_tfi_usage(BTS *the_bts)
tbf->trx->trx_no) == tbf);
}
*tbf_var = tbf;
- if (!(pdch->assigned_tfi() & (1 << tbf->tfi())))
- fprintf(stderr, "ERROR: "
- "TFI not marked as used in PDCH\n");
+ OSMO_ASSERT(pdch->assigned_tfi(tbf->direction) &
+ (1 << tbf->tfi()));
}
}
}