aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/bsc_vty.c
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-07-17 16:03:07 +0200
committerStefan Sperling <ssperling@sysmocom.de>2018-07-20 13:33:37 +0200
commite67ebf0d44e71c92a5620044df44c69978e710a8 (patch)
tree5ef10bfc8bc6379d282ca521037612bd28d877f8 /src/osmo-bsc/bsc_vty.c
parentfec10cfa89d196c1c4fbea8d5b2997a94697da86 (diff)
fix handling of invalid pchan names in vty
If an invalid phys_chan_config is specified in osmo-bsc.cfg, raise a parsing error at program startup. If an invalid phys_chan_config is specified in in the VTY while the program is running, show a warning to inform the user that the configuration change was not applied. Change-Id: I97baa359464a0e94de2497bc9214b99ed2a24041 Related: OS#1876
Diffstat (limited to 'src/osmo-bsc/bsc_vty.c')
-rw-r--r--src/osmo-bsc/bsc_vty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 57c536323..77a534d51 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -4032,8 +4032,10 @@ DEFUN_HIDDEN(cfg_ts_pchan_compat,
int pchanc;
pchanc = gsm_pchan_parse(argv[0]);
- if (pchanc < 0)
- return CMD_WARNING;
+ if (pchanc < 0) {
+ vty_out(vty, "Unknown physical channel name '%s'%s", argv[0], VTY_NEWLINE);
+ return CMD_ERR_NO_MATCH;
+ }
ts->pchan = pchanc;