summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile/vty_interface.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2018-06-04 06:37:55 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2018-06-04 06:50:25 +0200
commitfcb420d50b2cc3a73487f49d8d09d04d07bab7a8 (patch)
tree812edc062be5ef048eff56b33b4fdea6ff7895da /src/host/layer23/src/mobile/vty_interface.c
parenta81c83fc2cd9ef04167a499011315878281afd2e (diff)
mobile/sms: Make it optional to store the SMS on disk
Disable storing the SMS on disk. This is useful when scripting mobile. Keep the default of attempting to store it to disk. Change-Id: I6353447343d98ebaa5e12ab63f995750f81c8500
Diffstat (limited to 'src/host/layer23/src/mobile/vty_interface.c')
-rw-r--r--src/host/layer23/src/mobile/vty_interface.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c
index f8ecb28c..ec1216ff 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -1766,6 +1766,26 @@ DEFUN(cfg_ms_no_sms_sca, cfg_ms_no_sms_sca_cmd, "no sms-service-center",
return CMD_SUCCESS;
}
+DEFUN(cfg_ms_no_sms_store, cfg_ms_no_sms_store_cmd, "no sms-store",
+ NO_STR "Store SMS in the home directory")
+{
+ struct osmocom_ms *ms = vty->index;
+ struct gsm_settings *set = &ms->settings;
+
+ set->store_sms = false;
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_ms_sms_store, cfg_ms_sms_store_cmd, "sms-store",
+ "Store SMS in the home directory")
+{
+ struct osmocom_ms *ms = vty->index;
+ struct gsm_settings *set = &ms->settings;
+
+ set->store_sms = true;
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_no_cw, cfg_ms_no_cw_cmd, "no call-waiting",
NO_STR "Disallow waiting calls")
{
@@ -2909,6 +2929,8 @@ int ms_vty_init(void)
install_element(MS_NODE, &cfg_ms_neighbour_cmd);
install_element(MS_NODE, &cfg_ms_no_neighbour_cmd);
install_element(MS_NODE, &cfg_ms_any_timeout_cmd);
+ install_element(MS_NODE, &cfg_ms_sms_store_cmd);
+ install_element(MS_NODE, &cfg_ms_no_sms_store_cmd);
install_element(MS_NODE, &cfg_ms_support_cmd);
install_node(&support_node, config_write_dummy);
install_element(SUPPORT_NODE, &cfg_ms_sup_dtmf_cmd);