aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-12-28 12:08:28 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-02 11:43:06 +0100
commit454140e7fcd9c904ffbdf5b16af84e52efe9b4d4 (patch)
treece7409a449e1e42280967b8fb5ad2db5303ed588 /openbsc/src/libbsc/bsc_vty.c
parent52fa7bd2da381cf933052806eb1fd78f3fc0967c (diff)
lchan: Remember why a channel is broken using static strings
Remember why a channel is being marked as broken. So we can maybe understand what happend.
Diffstat (limited to 'openbsc/src/libbsc/bsc_vty.c')
-rw-r--r--openbsc/src/libbsc/bsc_vty.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 0e38a7c86..3e7ac585e 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -959,9 +959,12 @@ static void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan)
vty_out(vty, "BTS %u, TRX %u, Timeslot %u, Lchan %u: Type %s%s",
lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr,
lchan->nr, gsm_lchant_name(lchan->type), VTY_NEWLINE);
- vty_out(vty, " Connection: %u, State: %s%s",
+ vty_out(vty, " Connection: %u, State: %s%s%s%s",
lchan->conn ? 1: 0,
- gsm_lchans_name(lchan->state), VTY_NEWLINE);
+ gsm_lchans_name(lchan->state),
+ lchan->state == LCHAN_S_BROKEN ? " Error reason: " : "",
+ lchan->state == LCHAN_S_BROKEN ? lchan->broken_reason : "",
+ VTY_NEWLINE);
vty_out(vty, " BS Power: %u dBm, MS Power: %u dBm%s",
lchan->ts->trx->nominal_power - lchan->ts->trx->max_power_red
- lchan->bs_power*2,