[MERGED] openbsc[master]: libmsc: use SMPP34_DELIVERY_RECEIPT_* in libsmpp34

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Aug 15 13:25:38 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: libmsc: use SMPP34_DELIVERY_RECEIPT_* in libsmpp34
......................................................................


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
---
M openbsc/src/libmsc/smpp_openbsc.c
1 file changed, 1 insertion(+), 7 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/libmsc/smpp_openbsc.c b/openbsc/src/libmsc/smpp_openbsc.c
index ddb24b5..f2a036d 100644
--- a/openbsc/src/libmsc/smpp_openbsc.c
+++ b/openbsc/src/libmsc/smpp_openbsc.c
@@ -627,10 +627,6 @@
 	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 @@
 	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;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie78e17323796120f576b9c0e1bc5ccc32da8ee12
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pablo Neira Ayuso <pablo at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pablo Neira Ayuso <pablo at gnumonks.org>



More information about the gerrit-log mailing list