diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-09-09 13:19:06 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-09-17 11:05:45 +0200 |
commit | 63700ead348ef8bf9a9fe64cff0722d197151be2 (patch) | |
tree | 477a41d0f3ad236521f379637fdd2f20e15d2a2f /src/pcu_vty.c | |
parent | 474dc77894ad550dab225da36c377a6506cad6f7 (diff) |
Use osmo_tdef to implement ms-idle-time
This commit would also remove the option from config_write_pcu() since
it's automatically filled in by osmo_tdef, but there was actually a bug
because that param was never printed when saving the config...
Change-Id: Id8e70b0f44ef2f7e20ecdb3fd8ca93ae2a05b9a3
Diffstat (limited to 'src/pcu_vty.c')
-rw-r--r-- | src/pcu_vty.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 380b173a..477486c0 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -901,27 +901,31 @@ DEFUN(cfg_pcu_no_dl_tbf_preemptive_retransmission, } #define MS_IDLE_TIME_STR "keep an idle MS object alive for the time given\n" -DEFUN(cfg_pcu_ms_idle_time, +DEFUN_DEPRECATED(cfg_pcu_ms_idle_time, cfg_pcu_ms_idle_time_cmd, "ms-idle-time <1-7200>", MS_IDLE_TIME_STR "idle time in sec") { - struct gprs_rlcmac_bts *bts = bts_main_data(); + vty_out(vty, "%% 'ms-idle-time' is now deprecated: use 'timer X2030 <val>' instead%s", VTY_NEWLINE); - bts->ms_idle_sec = atoi(argv[0]); + struct gprs_rlcmac_bts *bts = bts_main_data(); + if (osmo_tdef_set(bts->T_defs_pcu, -2030, atoi(argv[0]), OSMO_TDEF_S) < 0) + return CMD_WARNING; return CMD_SUCCESS; } -DEFUN(cfg_pcu_no_ms_idle_time, +DEFUN_DEPRECATED(cfg_pcu_no_ms_idle_time, cfg_pcu_no_ms_idle_time_cmd, "no ms-idle-time", NO_STR MS_IDLE_TIME_STR) { - struct gprs_rlcmac_bts *bts = bts_main_data(); + vty_out(vty, "%% 'no ms-idle-time' is now deprecated: use 'timer X2030 0' instead%s", VTY_NEWLINE); - bts->ms_idle_sec = 0; + struct gprs_rlcmac_bts *bts = bts_main_data(); + if (osmo_tdef_set(bts->T_defs_pcu, -2030, 0, OSMO_TDEF_S) < 0) + return CMD_WARNING; return CMD_SUCCESS; } |