From e972dba8ddc2f92384fc5e78752f8138203f7313 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 8 Mar 2013 07:44:45 +0000 Subject: [PATCH] bsc_vty: Prevent printing -1 as unsigned integer for timeslot TSC --- openbsc/src/libbsc/bsc_vty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index cf4337073..d985e0349 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");