aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2017-08-11 14:36:01 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-27 17:40:55 +0200
commit042ffe322c9c4d5334ab5f03e2bffd310d560e1f (patch)
treefcea0373850f2e121f84798ede72cf9489924ee9
parent9b7f16317deed5f3fd287c52f72b3727c32f293b (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--src/libmsc/smpp_openbsc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c
index abf3b3c8..c2f2f3bc 100644
--- a/src/libmsc/smpp_openbsc.c
+++ b/src/libmsc/smpp_openbsc.c
@@ -631,10 +631,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)
{
@@ -680,9 +676,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;