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>2011-08-25 23:17:58 +0200
commiteca2b31f6297891ce4c3a2fdc7858e7cd8a4bccb (patch)
treef665b8dfdbbf45185b80fe41b49a8efd0c83728b
parent45a833b4cd0cc0f1d11a6467466ecf3d93407b33 (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 356ed28..ef7654a 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);