aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-04 11:58:37 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-04 12:04:22 +0100
commitde9e6461937d9840c91fe73f3e57c5bb7a823e99 (patch)
tree5bd4e2d3d02545109da7d00311c3ff6f11978110
parent3863beef260a58f692dd2d041a5547d3635c6e6b (diff)
vty: don't store configurations for timeslots in mode NONE
This reflects what happens in libosmo-abis during 'show e1' and makes sure we don't attempt to write for more TS than exist (e.g. in the T1 case). Change-Id: Iaeac2d080ae3ddc27901cbc4be5220100e9820a8
-rw-r--r--src/vty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vty.c b/src/vty.c
index f0c8287..9dc548b 100644
--- a/src/vty.c
+++ b/src/vty.c
@@ -170,6 +170,9 @@ static void config_write_recorder_line(struct vty *vty, unsigned int lnr)
struct e1inp_ts *ts = &line->ts[i];
const char *mode_str;
+ if (ts->type == E1INP_TS_TYPE_NONE)
+ continue;
+
mode_str = get_value_string(e1inp_ts_type_names, ts->type);
vty_out(vty, " line %u ts %u mode %s%s",