summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2017-08-07 14:01:15 +0100
committerPablo Neira Ayuso <pablo@gnumonks.org>2017-08-09 13:08:53 +0200
commit0a20d62972c6e3689ac1256fe60861699ae94583 (patch)
tree140674ce02cbcc304ab9060391a4f773826a094a /openbsc/src/libmsc
parentf8b2d46dc00ff4da96c6932b6cfd5b792b36b209 (diff)
libmsc: set registered_delivery field in SMPP 3.4 DELIVER_SM messages
Propagate the status report request field to the SMPP message through the registered_delivery field, so the ESME knows that the mobile phone is asking for explicit delivery acknowledgment is required. See SMPP 3.4 specs section 5.2.17. Change-Id: I59af60fa89cd10ae973c5e122789e3e03e3728ee
Diffstat (limited to 'openbsc/src/libmsc')
-rw-r--r--openbsc/src/libmsc/smpp_openbsc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c
index 6b89df26f..cf786765b 100644
--- a/openbsc/src/libmsc/smpp_openbsc.c
+++ b/openbsc/src/libmsc/smpp_openbsc.c
@@ -602,6 +602,10 @@ struct osmo_smpp_cmd *smpp_cmd_find_by_seqnum(struct osmo_esme *esme,
return NULL;
}
+/* See SMPP 3.4, Section 5.2.17. registered_delivery (1 byte field). */
+#define SMPP34_NO_DELIVERY_RECEIPT 0x0
+#define SMPP34_DELIVERY_RECEIPT_REQ 0x1
+
static int deliver_to_esme(struct osmo_esme *esme, struct gsm_sms *sms,
struct gsm_subscriber_connection *conn)
{
@@ -642,7 +646,10 @@ static int deliver_to_esme(struct osmo_esme *esme, struct gsm_sms *sms,
deliver.protocol_id = sms->protocol_id;
deliver.priority_flag = 0;
- deliver.registered_delivery = 0;
+ if (sms->status_rep_req)
+ deliver.registered_delivery = SMPP34_DELIVERY_RECEIPT_REQ;
+ else
+ deliver.registered_delivery = SMPP34_NO_DELIVERY_RECEIPT;
/* Figure out SMPP DCS from TP-DCS */
dcs = sms->data_coding_scheme;