summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2017-08-11 14:36:01 +0200
committerHarald Welte <laforge@gnumonks.org>2017-08-15 13:25:36 +0000
commite4290b1501db82e47d5ae2bbd179c01e092de7bd (patch)
tree44d3d798f55365b1b3aaccec4cb5dd7bcef872eb
parent4b70c9ec06c852c68aed7eb1e54faf23793602c0 (diff)
libmsc: use SMPP34_DELIVERY_RECEIPT_* in libsmpp34
Use new definitions in libsmpp34 to set the registered_delivery field accordingly, as provided by I5b3afff1b3b77cccd949e0606914c7ac3ba6114c. Moreover, do not set this header field to zero if status reports are off, the deliver_t structure has been already zeroed so this not required. Change-Id: Ie78e17323796120f576b9c0e1bc5ccc32da8ee12
-rw-r--r--openbsc/src/libmsc/smpp_openbsc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c
index ddb24b5f1..f2a036dbb 100644
--- a/openbsc/src/libmsc/smpp_openbsc.c
+++ b/openbsc/src/libmsc/smpp_openbsc.c
@@ -627,10 +627,6 @@ 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)
{
@@ -676,9 +672,7 @@ static int deliver_to_esme(struct osmo_esme *esme, struct gsm_sms *sms,
deliver.protocol_id = sms->protocol_id;
deliver.priority_flag = 0;
if (sms->status_rep_req)
- deliver.registered_delivery = SMPP34_DELIVERY_RECEIPT_REQ;
- else
- deliver.registered_delivery = SMPP34_NO_DELIVERY_RECEIPT;
+ deliver.registered_delivery = SMPP34_DELIVERY_RECEIPT_ON;
/* Figure out SMPP DCS from TP-DCS */
dcs = sms->data_coding_scheme;