From 563d99d3c34861da410bb043d0379b75dfaefdf3 Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Thu, 11 Aug 2011 04:40:00 +0200 Subject: libbsc: Only skip lchans with state AND type set to NONE in show lchan The function lchan_alloc only considers lchans to be available if both the type and state are NONE. So change show lchan to list all lchans that are not considered available. --- openbsc/src/libbsc/bsc_vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsc/src') diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index e9c54faf5..8a5c7fdf2 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -942,7 +942,7 @@ static int lchan_summary(struct vty *vty, int argc, const char **argv, for (lchan_nr = 0; lchan_nr < TS_MAX_LCHAN; lchan_nr++) { lchan = &ts->lchan[lchan_nr]; - if (lchan->type == GSM_LCHAN_NONE) + if ((lchan->type == GSM_LCHAN_NONE) && (lchan->state == LCHAN_S_NONE)) continue; dump_cb(vty, lchan); } -- cgit v1.2.3