vty: Ensure radio-link-timeout is a multiple of 4
According to Table 10.5.2.3.1 in TS 144.018, radio-link-timeout values are between 4 to 64 in steps of 4. Change-Id: I733591d5f72f2e4f822761ca9eda85de7a4c6c81
This commit is contained in:
parent
29389bd44a
commit
c37fcff9c5
|
@ -1481,8 +1481,15 @@ DEFUN_USRATTR(cfg_bts_radio_link_timeout,
|
|||
"Radio link timeout value (lost SACCH block)\n")
|
||||
{
|
||||
struct gsm_bts *bts = vty->index;
|
||||
unsigned int radio_link_timeout = atoi(argv[0]);
|
||||
|
||||
gsm_bts_set_radio_link_timeout(bts, atoi(argv[0]));
|
||||
/* According to Table 10.5.2.3.1 in TS 144.018 */
|
||||
if (radio_link_timeout % 4 != 0) {
|
||||
vty_out(vty, "%% Radio link timeout must be a multiple of 4%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
gsm_bts_set_radio_link_timeout(bts, radio_link_timeout);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue