[PATCH] osmo-msc[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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Aug 24 17:41:11 UTC 2017


Review at  https://gerrit.osmocom.org/3664

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


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/64/3664/1

diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c
index abf3b3c..c2f2f3b 100644
--- a/src/libmsc/smpp_openbsc.c
+++ b/src/libmsc/smpp_openbsc.c
@@ -631,10 +631,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)
 {
@@ -680,9 +676,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/3664
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie78e17323796120f576b9c0e1bc5ccc32da8ee12
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pablo Neira Ayuso <pablo at gnumonks.org>



More information about the gerrit-log mailing list