summaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-06-08 19:27:15 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-09-11 18:01:52 +0200
commit31b245b91afa21fbf6907c0f08b548a210d7ac70 (patch)
treeca2cb035b0b5ea736e6e9a0713d267837dd09db1 /openbsc/src/osmo-bsc/osmo_bsc_vty.c
parentcbaa880ae8362ecb44482978aff398a397514310 (diff)
bsc: Add vty code for allowing emergency
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_vty.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_vty.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
index 50b5b73..9f1eb69 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
@@ -117,6 +117,8 @@ static void write_msc(struct vty *vty, struct osmo_msc_data *msc)
vty_out(vty, " type %s%s", msc->type == MSC_CON_TYPE_NORMAL ?
"normal" : "local", VTY_NEWLINE);
+ vty_out(vty, " allow-emergency %s%s", msc->allow_emerg ?
+ "allow" : "deny", VTY_NEWLINE);
}
static int config_write_msc(struct vty *vty)
@@ -351,6 +353,17 @@ DEFUN(cfg_net_msc_type,
return CMD_SUCCESS;
}
+DEFUN(cfg_net_msc_emerg,
+ cfg_net_msc_emerg_cmd,
+ "allow-emergency (allow|deny)",
+ "Allow CM ServiceRequests with type emergency\n"
+ "Allow\n" "Deny\n")
+{
+ struct osmo_msc_data *data = osmo_msc_data(vty);
+ data->allow_emerg = strcmp("allow", argv[0]) == 0;
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_net_bsc_mid_call_text,
cfg_net_bsc_mid_call_text_cmd,
"mid-call-text .TEXT",
@@ -439,6 +452,7 @@ int bsc_vty_init_extra(void)
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_type_cmd);
+ install_element(MSC_NODE, &cfg_net_msc_emerg_cmd);
install_element_ve(&show_statistics_cmd);
install_element_ve(&show_mscs_cmd);