aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2017-08-07 14:01:25 +0100
committerPablo Neira Ayuso <pablo@gnumonks.org>2017-08-09 13:08:53 +0200
commitf354a8e1c5633a43d7bca986e8de82d23610d2a9 (patch)
treef31cfa08237136403f8de8c492409380c024076b
parent39181ac4a2b0686fb27b35d89af2dfee1d7c285d (diff)
utils: smpp_mirror: temporarily munch SMPP delivery receipts
Just munch and log SMPP delivery receipts by now, don't mirror this, it is going to break things in openbsc. Follow up patch removes this and mirrors this SMPP message as a SUBMIT_SM with esm_class = Delivery Acknowledgement. Change-Id: I78e93bc4034679e238c8642ccf6a0e844b1d6d8b
-rw-r--r--openbsc/src/utils/smpp_mirror.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/src/utils/smpp_mirror.c b/openbsc/src/utils/smpp_mirror.c
index ec28f0ab4..edb40b574 100644
--- a/openbsc/src/utils/smpp_mirror.c
+++ b/openbsc/src/utils/smpp_mirror.c
@@ -112,6 +112,14 @@ static int smpp_handle_deliver(struct esme *esme, struct msgb *msg)
PACK_AND_SEND(esme, &deliver_r);
+ /* This is a delivery receipt, temporarily munch it until we teach
+ * openbsc what to do with this.
+ */
+ if (deliver.esm_class == 0x04) {
+ LOGP(DSMPP, LOGL_NOTICE, "%s\n", deliver.short_message);
+ return 0;
+ }
+
memset(&submit, 0, sizeof(submit));
submit.command_id = SUBMIT_SM;
submit.command_status = ESME_ROK;