From b02fc1e9bb97156f049ca4ed6adc3b7e0aeb3f1e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 12 Feb 2013 11:15:49 +0100 Subject: VTY: backwards compatibility for 'logging level sms' when the SMS code was moved into libosmocore, its logging prefix was changed from 'sms' to 'lsms', which breaks existing config files. This introduces a deprecated/hidden vty command to make sure those config files are still parsed OK, and will simply print a warning message about the config needing some update. --- openbsc/src/libmsc/vty_interface_layer3.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 60eacad3d..441ee1e5e 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -911,6 +911,18 @@ DEFUN(mnccint_def_codec_h, return CMD_SUCCESS; } +/* this is just for backwards compatibility as the sms code moved into + * libosmocore and old config files no longer parse... */ +DEFUN_DEPRECATED(log_level_sms, log_level_sms_cmd, + "logging level sms (everything|debug|info|notice|error|fatal)", + ".HIDDEN") +{ + vty_out(vty, "%% 'logging level sms' is now called 'logging level " + "lsms', please update your config %s", VTY_NEWLINE); + + return CMD_SUCCESS; +} + int bsc_vty_init_extra(void) { osmo_signal_register_handler(SS_SCALL, scall_cbfn, NULL); @@ -952,5 +964,7 @@ int bsc_vty_init_extra(void) install_element(MNCC_INT_NODE, &mnccint_def_codec_f_cmd); install_element(MNCC_INT_NODE, &mnccint_def_codec_h_cmd); + install_element(CFG_LOG_NODE, &log_level_sms_cmd); + return 0; } -- cgit v1.2.3