diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-10-26 12:09:01 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-10-26 18:10:51 +0200 |
commit | 69db1e9498ad657ecce60f7ec87dd95cda552718 (patch) | |
tree | 82260a01e591fd8f0dc94304fcd21f42bdc5927c /src | |
parent | da4af65a51ee8b8d7b380330c0301de293347563 (diff) |
vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'
Related: OS#6161
Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bsc/bsc_vty.c | 18 | ||||
-rw-r--r-- | src/osmo-bsc/lchan_rtp_fsm.c | 2 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 11fcfad6d..a20cdfb5f 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -2524,7 +2524,7 @@ static void write_msc_amr_options(struct vty *vty, struct bsc_msc_data *msc) if (msc->amr_octet_aligned) vty_out(vty, " amr-payload octet-aligned%s", VTY_NEWLINE); else - vty_out(vty, " amr-payload bandwith-efficient%s", VTY_NEWLINE); + vty_out(vty, " amr-payload bandwidth-efficient%s", VTY_NEWLINE); } static void msc_write_nri(struct vty *vty, struct bsc_msc_data *msc, bool verbose); @@ -3212,7 +3212,7 @@ ALIAS_DEPRECATED(cfg_net_msc_dest, cfg_net_msc_no_dest_cmd, DEFUN_USRATTR(cfg_net_msc_amr_octet_align, cfg_net_msc_amr_octet_align_cmd, X(BSC_VTY_ATTR_NEW_LCHAN), - "amr-payload (octet-aligned|bandwith-efficient", + "amr-payload (octet-aligned|bandwidth-efficient)", "Set AMR payload framing mode\n" "payload fields aligned on octet boundaries\n" "payload fields packed (AoIP)\n") @@ -3221,11 +3221,22 @@ DEFUN_USRATTR(cfg_net_msc_amr_octet_align, if (strcmp(argv[0], "octet-aligned") == 0) data->amr_octet_aligned = true; - else if (strcmp(argv[0], "bandwith-efficient") == 0) + else if (strcmp(argv[0], "bandwidth-efficient") == 0) data->amr_octet_aligned = false; + else { + data->amr_octet_aligned = false; + vty_out(vty, "%% Command 'amr-payload': Option 'bandwith-efficient' " + "containing typo is deprecated, use 'bandwidth-efficient' instead!%s", + VTY_NEWLINE); + } return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_net_msc_amr_octet_align, + cfg_net_msc_amr_octet_align_deprecated_cmd, + "amr-payload bandwith-efficient", + "Set AMR payload framing mode\n" + "payload fields packed (AoIP)\n"); DEFUN_ATTR(cfg_msc_nri_add, cfg_msc_nri_add_cmd, "nri add <0-32767> [<0-32767>]", @@ -3527,6 +3538,7 @@ int bsc_vty_init(struct gsm_network *network) install_element(MSC_NODE, &cfg_net_msc_amr_5_15_cmd); install_element(MSC_NODE, &cfg_net_msc_amr_4_75_cmd); install_element(MSC_NODE, &cfg_net_msc_amr_octet_align_cmd); + install_element(MSC_NODE, &cfg_net_msc_amr_octet_align_deprecated_cmd); install_element(MSC_NODE, &cfg_net_msc_lcls_mode_cmd); install_element(MSC_NODE, &cfg_net_msc_lcls_mismtch_cmd); install_element(MSC_NODE, &cfg_msc_cs7_bsc_addr_cmd); diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index b788e9935..466b1681d 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -919,7 +919,7 @@ void mgcp_pick_codec(struct mgcp_conn_peer *verb_info, const struct gsm_lchan *l if (bss_side && verb_info->codecs[0] == CODEC_AMR_8000_1) { /* FIXME: At the moment all BTSs we support are using the * octet-aligned payload format. However, in the future - * we may support BTSs that are using bandwith-efficient + * we may support BTSs that are using bandwidth-efficient * format. In this case we will have to add functionality * that distinguishes by the BTS model which mode to use. */ verb_info->param.amr_octet_aligned = true; |