diff options
author | Pablo Neira Ayuso <pablo@gnumonks.org> | 2017-08-07 14:01:35 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@gnumonks.org> | 2017-08-09 14:21:38 +0200 |
commit | ab1316731e95f5d6b54d1f36df87e1d38185024d (patch) | |
tree | 5ab7de1f0436381df5e60a5693940d9ae516d5c5 /openbsc/src | |
parent | 7cfd1a3beebba66d8385037a39cf7154fd5e6eb3 (diff) |
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
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/utils/smpp_mirror.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/openbsc/src/utils/smpp_mirror.c b/openbsc/src/utils/smpp_mirror.c index 88545de61..c5705059b 100644 --- a/openbsc/src/utils/smpp_mirror.c +++ b/openbsc/src/utils/smpp_mirror.c @@ -123,14 +123,6 @@ 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; @@ -148,7 +140,14 @@ static int smpp_handle_deliver(struct esme *esme, struct msgb *msg) 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; |