summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/gsmd/usock.h1
-rw-r--r--src/gsmd/sms_pdu.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h
index ddec870..8bd5686 100644
--- a/include/gsmd/usock.h
+++ b/include/gsmd/usock.h
@@ -511,6 +511,7 @@ struct gsmd_sms {
int has_header;
int is_voicemail;
struct gsmd_sms_datacodingscheme dcs;
+ enum gsmd_sms_tp_mti tp_mti;
char data[GSMD_SMS_DATA_MAXLEN+1];
} __attribute__ ((packed));
diff --git a/src/gsmd/sms_pdu.c b/src/gsmd/sms_pdu.c
index 08a0c1a..3d88663 100644
--- a/src/gsmd/sms_pdu.c
+++ b/src/gsmd/sms_pdu.c
@@ -103,6 +103,7 @@ int sms_pdu_to_msg(struct gsmd_sms_list *dst,
/* TP-MTI */
switch (src[0] & 3) {
case GSMD_SMS_TP_MTI_DELIVER:
+ dst->payload.tp_mti = GSMD_SMS_TP_MTI_DELIVER;
if (len < 3)
return 1;
i = sms_number_bytelen(src[2], src[1]);
@@ -167,6 +168,7 @@ int sms_pdu_to_msg(struct gsmd_sms_list *dst,
break;
case GSMD_SMS_TP_MTI_SUBMIT:
+ dst->payload.tp_mti = GSMD_SMS_TP_MTI_SUBMIT;
if (len < 4)
return 1;
i = sms_number_bytelen(src[3], src[2]);
@@ -217,6 +219,7 @@ int sms_pdu_to_msg(struct gsmd_sms_list *dst,
dst->payload.data[i] = 0;
break;
case GSMD_SMS_TP_MTI_STATUS_REPORT:
+ dst->payload.tp_mti = GSMD_SMS_TP_MTI_STATUS_REPORT;
if (len < 3)
return 1;
personal git repositories of Harald Welte. Your mileage may vary