aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-03-08 07:44:45 +0000
committerHarald Welte <laforge@gnumonks.org>2013-03-08 07:45:29 +0000
commite972dba8ddc2f92384fc5e78752f8138203f7313 (patch)
tree99eaed4d5becbce6d1f395d630b3b167eb2e0abf
parent9b5192b153e51419f91d9b4092053b43e275371b (diff)
bsc_vty: Prevent printing -1 as unsigned integer for timeslot TSC
-rw-r--r--openbsc/src/libbsc/bsc_vty.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index cf433707..d985e034 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -732,7 +732,8 @@ 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);
+ gsm_pchan_name(ts->pchan),
+ ts->tsc == -1 ? ts->trx->bts->tsc : ts->tsc);
if (ts->pchan == GSM_PCHAN_TCH_F_PDCH)
vty_out(vty, " (%s mode)",
ts->flags & TS_F_PDCH_MODE ? "PDCH" : "TCH/F");