aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-01-19 17:18:21 +0100
committerHarald Welte <laforge@gnumonks.org>2014-01-19 17:32:59 +0100
commit1fe241294960e91057d215ff8260f1047e8a7cd0 (patch)
tree906625aedc0476a93f992f062cb13b2cc64552e6 /openbsc/src/libbsc/bsc_vty.c
parent903aaea6689cc08c0e33fb05659c808a5e5f754f (diff)
TSC: Add new gsm_ts_tsc() function to resolve TSC of TS
We don't want every caller to check for ts->tsc == -1 and then using ts->trx->bts->tsc instead. Rather, introduce a new inline function to retrieve the correct value.
Diffstat (limited to 'openbsc/src/libbsc/bsc_vty.c')
-rw-r--r--openbsc/src/libbsc/bsc_vty.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index b906c2ee3..00307649a 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -795,8 +795,7 @@ static void ts_dump_vty(struct vty *vty, struct gsm_bts_trx_ts *ts)
{
vty_out(vty, "BTS %u, TRX %u, Timeslot %u, phys cfg %s, TSC %u",
ts->trx->bts->nr, ts->trx->nr, ts->nr,
- gsm_pchan_name(ts->pchan),
- ts->tsc == -1 ? ts->trx->bts->tsc : ts->tsc);
+ gsm_pchan_name(ts->pchan), gsm_ts_tsc(ts));
if (ts->pchan == GSM_PCHAN_TCH_F_PDCH)
vty_out(vty, " (%s mode)",
ts->flags & TS_F_PDCH_MODE ? "PDCH" : "TCH/F");