aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-05-19 02:28:26 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2021-05-31 05:20:03 +0000
commit27c07690d9ece5c8e752a40b5276934bfa1326e3 (patch)
treebe095a148a490b92610cb4b75518cc5e0ba60c0e /tests
parente262919892ab58fe122ae203d745bd2b6a45626e (diff)
replace ts_*_for_each_lchan() with ts_for_n_lchans()
So far we have a couple of macros iterating a specific number of lchans, depending on dynamic timeslot state etc. With addition of VAMOS lchans, this would become more complex and bloated. Instead of separate iteration macros for each situation, only have one that takes a number of lchans as argument. That allows to more clearly pick the number of lchans, especially for non-trivial VAMOS scenarios. Related: SYS#5315 OS#4940 Change-Id: Ib2c6baf73a81ba371143ba5adc912aef6f79238d
Diffstat (limited to 'tests')
-rw-r--r--tests/handover/handover_test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 006e7910c..e65392038 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -463,7 +463,8 @@ static void lchan_clear(struct gsm_lchan *lchan)
static void ts_clear(struct gsm_bts_trx_ts *ts)
{
struct gsm_lchan *lchan;
- ts_for_each_lchan(lchan, ts) {
+
+ ts_for_n_lchans(lchan, ts, ts->max_lchans_possible) {
if (lchan_state_is(lchan, LCHAN_ST_UNUSED))
continue;
lchan_clear(lchan);