aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/msc/db.h
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-01-22 17:05:37 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-25 16:16:15 +0000
commit87cba1f10599e9be8ea3350522a43df091448485 (patch)
tree065fe460fa644a078c900a27a97b43bda6f4995e /include/osmocom/msc/db.h
parent703f2ec6f40af2c2d46d10b5896b9dc74b65c3c0 (diff)
Add a VTY command which deletes all expired SMS.
We already delete SMS which have been sent successfully. However, there are plans to accept SMS for any subscriber in order to fix the problem described in https://osmocom.org/issues/2354 ("SMSC: Store&Forward not working for subscribed but unregistered MS"). This means we may end up storing SMS which never get sent, e.g. because the B subscriber doesn't actually exist. This could lead to a higher degree of SMS database growth over time, and therefore we need a way to keep database size under control. As a first step, introduce a DB function which removes an expired SMS, and add a VTY command which removes all expired SMS from the DB. Later commits will build upon this to remove expired SMS automatically. The SMS expiry time period is currently hard-coded to 2 weeks. We could make this configurable in the future if desired. Change-Id: Icd6093b7b5d8db84b19a0aa47c68182566113ee2 Related: OS#2354
Diffstat (limited to 'include/osmocom/msc/db.h')
-rw-r--r--include/osmocom/msc/db.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/msc/db.h b/include/osmocom/msc/db.h
index 13c5ed363..2105d38da 100644
--- a/include/osmocom/msc/db.h
+++ b/include/osmocom/msc/db.h
@@ -50,6 +50,7 @@ int db_sms_mark_delivered(struct gsm_sms *sms);
int db_sms_inc_deliver_attempts(struct gsm_sms *sms);
int db_sms_delete_by_msisdn(const char *msisdn);
int db_sms_delete_sent_message_by_id(unsigned long long sms_id);
+int db_sms_delete_expired_message_by_id(unsigned long long sms_id);
/* Statistics counter storage */
struct osmo_counter;