pespin has uploaded this change for review. ( 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, 12 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/29876/1
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 11fcfad..d5df739 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,17 +3212,24 @@ 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|bandwith-efficient)", "Set AMR payload framing mode\n" "payload fields aligned on octet boundaries\n" - "payload fields packed (AoIP)\n") + "payload fields packed (AoIP)\n" + "payload fields packed (AoIP) (DEPRECATED option with typo)\n") { struct bsc_msc_data *data = bsc_msc_data(vty);
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 deprecaed, use 'bandwidth-efficient' instead!%s", + VTY_NEWLINE); + }
return CMD_SUCCESS; } 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;