summaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_vty.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-08-28 10:16:55 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-08-28 11:10:44 +0200
commit97e139f26790e8aadb677f846c4eba2c3d6f8323 (patch)
tree819013d410412ca04fe40b4addbafd6182653b14 /openbsc/src/osmo-bsc/osmo_bsc_vty.c
parent1b894022fd168d7b9a3e8cafaef1622c3a24885b (diff)
bsc/vty: Add 'no bsc-welcome-text' command
There was no command to reset a bsc-welcome-text string, so it has been added.
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_vty.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_vty.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
index 501d9f5..8eaa55b 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
@@ -111,8 +111,11 @@ static void write_msc(struct vty *vty, struct osmo_msc_data *msc)
vty_out(vty, " ip.access rtp-base %d%s", msc->rtp_base, VTY_NEWLINE);
vty_out(vty, " timeout-ping %d%s", msc->ping_timeout, VTY_NEWLINE);
vty_out(vty, " timeout-pong %d%s", msc->pong_timeout, VTY_NEWLINE);
+
if (msc->ussd_welcome_txt)
vty_out(vty, " bsc-welcome-text %s%s", msc->ussd_welcome_txt, VTY_NEWLINE);
+ else
+ vty_out(vty, " no bsc-welcome-text%s", VTY_NEWLINE);
if (msc->ussd_msc_lost_txt && msc->ussd_msc_lost_txt[0])
vty_out(vty, " bsc-msc-lost-text %s%s", msc->ussd_msc_lost_txt, VTY_NEWLINE);
@@ -361,7 +364,7 @@ DEFUN(cfg_net_msc_pong_time,
DEFUN(cfg_net_msc_welcome_ussd,
cfg_net_msc_welcome_ussd_cmd,
"bsc-welcome-text .TEXT",
- "Set the USSD notification to be sent.\n" "Text to be sent\n")
+ "Set the USSD notification to be sent\n" "Text to be sent\n")
{
struct osmo_msc_data *data = osmo_msc_data(vty);
char *str = argv_concat(argv, argc, 0);
@@ -373,6 +376,19 @@ DEFUN(cfg_net_msc_welcome_ussd,
return CMD_SUCCESS;
}
+DEFUN(cfg_net_msc_no_welcome_ussd,
+ cfg_net_msc_no_welcome_ussd_cmd,
+ "no bsc-welcome-text",
+ NO_STR "Clear the USSD notification to be sent\n")
+{
+ struct osmo_msc_data *data = osmo_msc_data(vty);
+
+ talloc_free(data->ussd_welcome_txt);
+ data->ussd_welcome_txt = 0;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_net_msc_lost_ussd,
cfg_net_msc_lost_ussd_cmd,
"bsc-msc-lost-text .TEXT",
@@ -612,6 +628,7 @@ int bsc_vty_init_extra(void)
install_element(MSC_NODE, &cfg_net_msc_ping_time_cmd);
install_element(MSC_NODE, &cfg_net_msc_pong_time_cmd);
install_element(MSC_NODE, &cfg_net_msc_welcome_ussd_cmd);
+ install_element(MSC_NODE, &cfg_net_msc_no_welcome_ussd_cmd);
install_element(MSC_NODE, &cfg_net_msc_lost_ussd_cmd);
install_element(MSC_NODE, &cfg_net_msc_no_lost_ussd_cmd);
install_element(MSC_NODE, &cfg_net_msc_type_cmd);