pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29876 )
Change subject: vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient' ......................................................................
vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient'
Related: OS#6161 Change-Id: Iefbadea374974587a421ec981e246b87c7b5de59 --- M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/lchan_rtp_fsm.c 2 files changed, 16 insertions(+), 4 deletions(-)
Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 11fcfad..a20cdfb 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -2524,7 +2524,7 @@ 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 @@ 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 @@
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 @@ 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 b788e99..466b168 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -919,7 +919,7 @@ 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;