From 9567f52dbf14097d8e19d0d858594d971aa725ec Mon Sep 17 00:00:00 2001 From: erin_yueh Date: Wed, 9 Jan 2008 05:25:53 +0000 Subject: gsmd: add TP-MTI to gsmd_sms (Erin Yueh) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3791 99fdad57-331a-0410-800a-d7fa5415bdb3 --- include/gsmd/usock.h | 1 + src/gsmd/sms_pdu.c | 3 +++ 2 files changed, 4 insertions(+) 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; -- cgit v1.2.3