aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2011-05-14 11:32:45 +0200
committerHarald Welte <laforge@gnumonks.org>2011-05-22 21:01:42 +0200
commitd2a7878b35dd1913e5e86cfe64ef0db9e0543a5f (patch)
treef0f1413fbb0d3a9bffc814b9b27ddebed4b37b46
parent1e9ae4be66eef151fec5cd08d532f6c1c191efed (diff)
abis: skip e1_input nesting if empty
With this patch, we don't include e1_input if it's empty [...] timeslot 7 phys_chan_config TCH/F hopping enabled 0 e1_input <----------------- empty, it should not show up. msc [...]
-rw-r--r--openbsc/src/libabis/e1_input_vty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/src/libabis/e1_input_vty.c b/openbsc/src/libabis/e1_input_vty.c
index 7dbf17a31..b211e818f 100644
--- a/openbsc/src/libabis/e1_input_vty.c
+++ b/openbsc/src/libabis/e1_input_vty.c
@@ -76,6 +76,9 @@ static int e1inp_config_write(struct vty *vty)
{
struct e1inp_line *line;
+ if (llist_empty(&e1inp_line_list))
+ return CMD_SUCCESS;
+
vty_out(vty, "e1_input%s", VTY_NEWLINE);
llist_for_each_entry(line, &e1inp_line_list, list) {