aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Whyte <keith@rhizomatica.org>2020-09-01 16:41:32 +0200
committerkeith <keith@rhizomatica.org>2020-09-22 12:43:14 +0000
commit192fefe53d13887568fe793e229c465a4e5e8177 (patch)
tree67fa20dcd2159f30761451fb79e2b52d2fd300f9
parent8c472bd111ed9592f2513d08990a78b70bccb44e (diff)
Don't Store an SMS in the database when the ESME is not BoundHEADmaster
We may never be able to deliver this SMS if it depends on the ESME, as we will not resubmit the SMS to the ESME. Better to reject it at this time and have the MS try again later. Change-Id: I2c50904349dd4ed229b60b8468d776b817c0bd44 Related: OS#4740
-rw-r--r--src/libmsc/gsm_04_11.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index 5c2692944..e5063dc1b 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -633,6 +633,16 @@ static int gsm340_rx_tpdu(struct gsm_trans *trans, struct msgb *msg,
if (gsms->smpp.esme) {
return -EINPROGRESS;
}
+
+ /* This SMS got routed through SMPP, but the configured ESME was
+ * unavailable at this time. This is an OOO condition.
+ * Don't store this SMS in the database as we may never be
+ * able to deliver it. (we would need to process the stored SMS and
+ * attempt re-submission to the ESME)
+ */
+ if (rc == GSM411_RP_CAUSE_MO_NET_OUT_OF_ORDER)
+ return rc;
+
/*
* This SMS got routed through SMPP or no receiver exists.
* In any case, we store it in the database for further processing.