Pablo Neira Ayuso has submitted this change and it was merged.

Change subject: utils: smpp_mirror: bounce Delivery Receipts as Delivery 
Acknowledgments
......................................................................


utils: smpp_mirror: bounce Delivery Receipts as Delivery Acknowledgments

Simple patch to test the new status-report support code, remove previous
code before Delivery Acknowledgement support was in place. Use
LOGL_DEBUG for logging messages here as suggested by Neels and Harald.

Change-Id: I877e228d8e174430f700631edbf9955972da7892
---
M openbsc/src/utils/smpp_mirror.c
1 file changed, 8 insertions(+), 9 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Pablo Neira Ayuso: Verified



diff --git a/openbsc/src/utils/smpp_mirror.c b/openbsc/src/utils/smpp_mirror.c
index 88545de..c570505 100644
--- a/openbsc/src/utils/smpp_mirror.c
+++ b/openbsc/src/utils/smpp_mirror.c
@@ -123,14 +123,6 @@
 
        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;
@@ -148,7 +140,14 @@
                OSMO_MIN(sizeof(submit.source_addr),
                         sizeof(deliver.destination_addr)));
 
-       submit.esm_class = deliver.esm_class;
+       /* Mirror delivery receipts as a delivery acknowledgements. */
+       if (deliver.esm_class == 0x04) {
+               LOGP(DSMPP, LOGL_DEBUG, "%s\n", deliver.short_message);
+               submit.esm_class = 0x08;
+       } else {
+               submit.esm_class = deliver.esm_class;
+       }
+
        submit.registered_delivery = deliver.registered_delivery;
        submit.protocol_id = deliver.protocol_id;
        submit.priority_flag = deliver.priority_flag;

-- 
To view, visit https://gerrit.osmocom.org/3436
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I877e228d8e174430f700631edbf9955972da7892
Gerrit-PatchSet: 4
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pablo Neira Ayuso <pa...@gnumonks.org>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Holger Freyther <hol...@freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte <ke...@rhizomatica.org>
Gerrit-Reviewer: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-Reviewer: Pablo Neira Ayuso <pa...@gnumonks.org>

Reply via email to