aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_vty.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-09-09 13:41:00 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-09-17 11:11:04 +0200
commit2b5c6290558c7d7c9c4161e21f371a81482ad892 (patch)
treec1ab8ee5091626f47f60a1452b8cca1604de7080 /src/pcu_vty.c
parent63700ead348ef8bf9a9fe64cff0722d197151be2 (diff)
Use osmo_tdef to implement dl-tbf-idle-time
Diffstat (limited to 'src/pcu_vty.c')
-rw-r--r--src/pcu_vty.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 477486c0..6592caee 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -253,9 +253,6 @@ static int config_write_pcu(struct vty *vty)
vty_out(vty, " two-phase-access%s", VTY_NEWLINE);
vty_out(vty, " alpha %d%s", bts->alpha, VTY_NEWLINE);
vty_out(vty, " gamma %d%s", bts->gamma * 2, VTY_NEWLINE);
- if (bts->dl_tbf_idle_msec)
- vty_out(vty, " dl-tbf-idle-time %d%s", bts->dl_tbf_idle_msec,
- VTY_NEWLINE);
if (!bts->dl_tbf_preemptive_retransmission)
vty_out(vty, " no dl-tbf-preemptive-retransmission%s", VTY_NEWLINE);
if (strcmp(bts->pcu_sock_path, PCU_SOCK_DEFAULT))
@@ -850,27 +847,31 @@ DEFUN(show_bts_stats,
}
#define IDLE_TIME_STR "keep an idle DL TBF alive for the time given\n"
-DEFUN(cfg_pcu_dl_tbf_idle_time,
+DEFUN_DEPRECATED(cfg_pcu_dl_tbf_idle_time,
cfg_pcu_dl_tbf_idle_time_cmd,
"dl-tbf-idle-time <1-5000>",
IDLE_TIME_STR "idle time in msec")
{
- struct gprs_rlcmac_bts *bts = bts_main_data();
+ vty_out(vty, "%% 'dl-tbf-idle-time' is now deprecated: use 'timer X2031 <val>' instead%s", VTY_NEWLINE);
- bts->dl_tbf_idle_msec = atoi(argv[0]);
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+ if (osmo_tdef_set(bts->T_defs_pcu, -2031, atoi(argv[0]), OSMO_TDEF_MS) < 0)
+ return CMD_WARNING;
return CMD_SUCCESS;
}
-DEFUN(cfg_pcu_no_dl_tbf_idle_time,
+DEFUN_DEPRECATED(cfg_pcu_no_dl_tbf_idle_time,
cfg_pcu_no_dl_tbf_idle_time_cmd,
"no dl-tbf-idle-time",
NO_STR IDLE_TIME_STR)
{
- struct gprs_rlcmac_bts *bts = bts_main_data();
+ vty_out(vty, "%% 'no dl-tbf-idle-time' is now deprecated: use 'timer X2031 0' instead%s", VTY_NEWLINE);
- bts->dl_tbf_idle_msec = 0;
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+ if (osmo_tdef_set(bts->T_defs_pcu, -2031, 0, OSMO_TDEF_MS) < 0)
+ return CMD_WARNING;
return CMD_SUCCESS;
}