This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13174 )
Change subject: vty: add cmd subscriber ID sms delete-all
......................................................................
vty: add cmd subscriber ID sms delete-all
In ttcn3-msc-tests, so far we leave an intentionally failed MT SMS in the SMS
queue, which may cause it to re-appear in subsequent tests.
Allow removing all SMS for a given subscriber from the SMS database for good.
(I dimly remember a user report where the SMS queue spams failed SMS attempts,
and the only way to get rid of SMS for a given subscriber is to tamper with the
sms.db file directly. This should no longer be necessary with this command.)
Related: I7dce12942a65eaaf97f78ca69401c7f93faacb9e (osmo-ttcn3-hacks)
Change-Id: I637cbd7adc075a192f49752b38779391472ff06d
---
M src/libmsc/msc_vty.c
1 file changed, 25 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
Harald Welte: Looks good to me, approved
Vadim Yanitskiy: Looks good to me, but someone else must approve
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 2adb2a4..ac3946a 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -959,6 +959,30 @@
return CMD_SUCCESS;
}
+DEFUN(subscriber_sms_delete_all,
+ subscriber_sms_delete_all_cmd,
+ "subscriber " SUBSCR_TYPES " ID sms delete-all",
+ SUBSCR_HELP "SMS Operations\n"
+ "Delete all SMS to be delivered to this subscriber"
+ " -- WARNING: the SMS data for all unsent SMS for this subscriber"
+ " WILL BE LOST.\n")
+{
+ struct vlr_subscr *vsub;
+
+ vsub = get_vsub_by_argv(gsmnet, argv[0], argv[1]);
+ if (!vsub) {
+ vty_out(vty, "%% No subscriber found for %s %s%s",
+ argv[0], argv[1], VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ db_sms_delete_by_msisdn(vsub->msisdn);
+
+ vlr_subscr_put(vsub);
+
+ return CMD_SUCCESS;
+}
+
DEFUN(subscriber_send_sms,
subscriber_send_sms_cmd,
"subscriber " SUBSCR_TYPES " ID sms sender " SUBSCR_TYPES " SENDER_ID send .LINE",
@@ -1651,6 +1675,7 @@
install_element(ENABLE_NODE, &smsqueue_clear_cmd);
install_element(ENABLE_NODE, &smsqueue_fail_cmd);
install_element(ENABLE_NODE, &subscriber_send_pending_sms_cmd);
+ install_element(ENABLE_NODE, &subscriber_sms_delete_all_cmd);
install_element(CONFIG_NODE, &cfg_mncc_int_cmd);
install_node(&mncc_int_node, config_write_mncc_int);
--
To view, visit https://gerrit.osmocom.org/13174
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I637cbd7adc075a192f49752b38779391472ff06d
Gerrit-Change-Number: 13174
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190311/87e0bcb3/attachment.htm>