aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Whyte <keith@rhizomatica.org>2018-11-16 13:29:05 +0000
committerKeith Whyte <keith@rhizomatica.org>2018-11-19 09:32:20 +0000
commitbea25f1302483a68f17f54ef5992a35b308b791d (patch)
tree7b3ce21e2737e7cc4278f3deaff5db2cda47dac6
parentba8a007a2dc95cb14671f3200148efdf76e5bd1d (diff)
libmsc: Don't send SMS STATUS REPORT locally if the ESME accepted it.
When using smpp-first, after the ESME accepts our STATUS REPORT, we were sending it locally into gsm340_rx_sms_submit() anyway. In the case of the ESME mirroring the report back to us, this would result in two copies of the status report in the SMS database, which were also both then delivered to the MS. This causes no visible error to the user but is a waste of radio resources. With this patch, we check if it is the sms_report that has had receiver set in sms_route_mt_sms() and not the original SMS we are reporting on, which of course already has receiver set. Change-Id: I3529b89535800eaa1127721d613fa7bbcb8b23be
-rw-r--r--src/libmsc/gsm_04_11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index 8d9169b8b..52edcd67f 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -691,7 +691,7 @@ static void sms_status_report(struct gsm_sms *gsms,
}
/* No route via SMPP, send the GSM 03.40 status-report now. */
- if (gsms->receiver)
+ if (sms_report->receiver)
gsm340_rx_sms_submit(sms_report);
LOGP(DLSMS, LOGL_NOTICE, "Status report has been sent\n");