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
This commit is contained in:
Pablo Neira Ayuso 2017-08-11 14:36:01 +02:00 committed by Neels Hofmeyr
parent 2d23e901a0
commit 4f03b47d84
1 changed files with 1 additions and 7 deletions

View File

@ -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;