diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-11-28 14:21:29 +0100 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-11-28 14:26:10 +0100 |
commit | 3b62449ab9d9bf9028827cb9171cdbcf55dc3aa3 (patch) | |
tree | 6e55d0bfcadfc3bc0a43078b5cc28823ae79fe7a | |
parent | 746df53ad2dde43d6d3230cfffbe0763405d4770 (diff) |
UNTESTED: fix count of waiting lchans on dyn TSneels/pdch_deact_nack
Change-Id: Ie7492d7785c62129985e383e19591578ecce253a
-rw-r--r-- | src/osmo-bsc/timeslot_fsm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c index a3374c352..41de24f7b 100644 --- a/src/osmo-bsc/timeslot_fsm.c +++ b/src/osmo-bsc/timeslot_fsm.c @@ -147,7 +147,9 @@ static int ts_lchans_waiting(struct gsm_bts_trx_ts *ts) { struct gsm_lchan *lchan; int count = 0; - ts_for_each_lchan(lchan, ts) + /* Make sure we count lchans waiting for a dyn TS that is still in pchan_is == PDCH: + * ts_subslots(PDCH) == 0, so rather use pchan_on_init's subslot count. */ + ts_as_pchan_for_each_lchan(lchan, ts, ts->pchan_on_init) if (lchan->fi->state == LCHAN_ST_WAIT_TS_READY) count++; return count; @@ -860,7 +862,9 @@ static struct osmo_fsm ts_fsm = { bool ts_is_lchan_waiting_for_pchan(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config *target_pchan) { struct gsm_lchan *lchan; - ts_for_each_lchan(lchan, ts) { + /* Make sure we count lchans waiting for a dyn TS that is still in pchan_is == PDCH: + * ts_subslots(PDCH) == 0, so rather use pchan_on_init's subslot count. */ + ts_as_pchan_for_each_lchan(lchan, ts, ts->pchan_on_init) { if (lchan->fi->state == LCHAN_ST_WAIT_TS_READY) { if (target_pchan) *target_pchan = gsm_pchan_by_lchan_type(lchan->type); |