summaryrefslogtreecommitdiffstats
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-05-02 19:24:29 +0200
commit01f19352069d51150bf20a23fc0dfc7ae3cb4d4a (patch)
treee603a8839cbd966feebcb8042a41b7dff8970a84
parentb7fabb65611b5a1977d6fb683b68761ce7b72bd4 (diff)
bsc: Add vty code for allowing emergency
-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 356ed2808..ef7654a40 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",
@@ -422,6 +435,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);