diff options
author | Keith Whyte <keith@rhizomatica.org> | 2022-05-22 01:57:31 +0200 |
---|---|---|
committer | Keith Whyte <keith@rhizomatica.org> | 2022-05-22 11:08:15 +0200 |
commit | dea294a25f71aba8a1be2e9738221f576caacdad (patch) | |
tree | 44d969965ea063494343dfb949e1157465fd3322 /src/libmsc/gsm_04_11.c | |
parent | 5f8ae371c619a71c3ef9574a8653cb80c93e149e (diff) |
Just delete, don't bother marking sent first.
Change-Id: I8a0dedf512d861ec02ecb3b5fe5bb1d09b92efe0
Diffstat (limited to 'src/libmsc/gsm_04_11.c')
-rw-r--r-- | src/libmsc/gsm_04_11.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index 743e2722b..ae7f336d5 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -56,6 +56,7 @@ #include <osmocom/msc/msub.h> #include <osmocom/msc/msc_a.h> #include <osmocom/msc/paging.h> +#include <osmocom/msc/sms_queue.h> #ifdef BUILD_SMPP #include "smpp_smsc.h" @@ -845,6 +846,7 @@ static int gsm411_rx_rp_ack(struct gsm_trans *trans, struct gsm411_rp_hdr *rph) { struct gsm_sms *sms = trans->sms.sms; + struct gsm_sms_queue *smq = trans->net->sms_queue; /* Acnkowledgement to MT RP_DATA, i.e. the MS confirms it * successfully received a SMS. We can now safely mark it as @@ -861,8 +863,12 @@ static int gsm411_rx_rp_ack(struct gsm_trans *trans, GSM411_RP_CAUSE_PROTOCOL_ERR); } - /* mark this SMS as sent in database */ - db_sms_mark_delivered(sms); + /* It seems there's little point in marking this SMS as sent in database + if the very next thing that happens to it is it will be deleted in the + signal callback. Let's do that deletion here. */ + + if (smq->cfg->delete_delivered == 0) + db_sms_mark_delivered(sms); send_signal(S_SMS_DELIVERED, trans, sms, 0); |