aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-08-16 19:47:39 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-05-02 19:24:30 +0200
commitedf32bbdeed1c1e9a73a48e15522b426b96cd682 (patch)
tree8bcd423695d047a092429c3fb70af506d998acae /openbsc/src/osmo-bsc/osmo_bsc_vty.c
parent06264b97edfa698335c567224b83300cd3209832 (diff)
bsc: Auto RF Off in case of missing MSC connection
For short IP failures we want the RF to stay up and wait for the re-connect but in case the A-link is gone too long it is good to switch off the RF and wait for commands to enable it again.
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_vty.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_vty.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
index a82a53868..f4c462efb 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
@@ -168,6 +168,10 @@ static int config_write_bsc(struct vty *vty)
vty_out(vty, " bsc-rf-socket %s%s",
bsc->rf_ctrl_name, VTY_NEWLINE);
+ if (bsc->auto_off_timeout != -1)
+ vty_out(vty, " bsc-auto-rf-off %d%s",
+ bsc->auto_off_timeout, VTY_NEWLINE);
+
return CMD_SUCCESS;
}
@@ -462,6 +466,26 @@ DEFUN(cfg_net_rf_socket,
return CMD_SUCCESS;
}
+DEFUN(cfg_net_rf_off_time,
+ cfg_net_rf_off_time_cmd,
+ "bsc-auto-rf-off <1-65000>",
+ "Disable RF on MSC Connection\n" "Timeout\n")
+{
+ struct osmo_bsc_data *data = osmo_bsc_data(vty);
+ data->auto_off_timeout = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_net_no_rf_off_time,
+ cfg_net_no_rf_off_time_cmd,
+ "no bsc-auto-rf-off",
+ NO_STR "Disable RF on MSC Connection\n")
+{
+ struct osmo_bsc_data *data = osmo_bsc_data(vty);
+ data->auto_off_timeout = -1;
+ return CMD_SUCCESS;
+}
+
DEFUN(show_statistics,
show_statistics_cmd,
"show statistics",
@@ -481,8 +505,8 @@ int bsc_vty_init_extra(void)
install_element(BSC_NODE, &cfg_net_bsc_mid_call_text_cmd);
install_element(BSC_NODE, &cfg_net_bsc_mid_call_timeout_cmd);
install_element(BSC_NODE, &cfg_net_rf_socket_cmd);
-
-
+ install_element(BSC_NODE, &cfg_net_rf_off_time_cmd);
+ install_element(BSC_NODE, &cfg_net_no_rf_off_time_cmd);
install_node(&msc_node, config_write_msc);
install_default(MSC_NODE);