vty: 'hopping arfcn add': succeed if adding arfcn already in set

There's no need to fail, simply make it a noop in that case,
everything's fine and everybody is happy (specially when using CTRL
command "apply-config-file" to load a .cfg file containing
modifications.

Related: SYS#6138
(cherry picked from Change-Id Ia4e70d20d48a28c46a21dd10358577e5c798744c)
Change-Id: I1f90f76653a8c4f76d1200ba370dc8fe2a568949
This commit is contained in:
Pau Espin 2022-09-30 17:44:44 +02:00 committed by pespin
parent 3fb5a3be36
commit 1fdb7b6c60
1 changed files with 1 additions and 1 deletions

View File

@ -401,7 +401,7 @@ DEFUN_USRATTR(cfg_ts_arfcn_add,
if (bitvec_get_bit_pos(&ts->hopping.arfcns, arfcn) == ONE) {
vty_out(vty, "%% ARFCN %" PRIu16 " is already set%s", arfcn, VTY_NEWLINE);
return CMD_WARNING;
return CMD_SUCCESS;
}
bitvec_set_bit_pos(&ts->hopping.arfcns, arfcn, 1);