aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-09-11 14:52:31 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-09-14 07:05:25 +0200
commitf1a73a5719002426f1f0a7ffdbec1dc1822c794c (patch)
tree972ecfe06059029efe3fee51c60b018d7d7e0f43
parent6c7766afed735500ffc4c3197518b479760edec6 (diff)
sms-part: always treat TP-DCS as a bitmask
-rw-r--r--src/mm-sms-part.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mm-sms-part.c b/src/mm-sms-part.c
index 01189f94..d252a85e 100644
--- a/src/mm-sms-part.c
+++ b/src/mm-sms-part.c
@@ -993,14 +993,19 @@ mm_sms_part_get_submit_pdu (MMSmsPart *part,
pdu[offset++] = 0x00;
/* ----------- TP-DCS (1 byte) ----------- */
+ pdu[offset] = 0x00;
if (part->encoding == MM_SMS_ENCODING_UCS2) {
mm_dbg (" using UCS2 encoding...");
- pdu[offset++] = 0x08;
- } else {
+ pdu[offset] |= SMS_DCS_CODING_UCS2;
+ } else if (part->encoding == MM_SMS_ENCODING_GSM7) {
mm_dbg (" using GSM7 encoding...");
- pdu[offset++] = 0x00; /* GSM */
+ pdu[offset] |= SMS_DCS_CODING_DEFAULT; /* GSM */
+ } else {
+ mm_dbg (" using 8bit encoding...");
+ pdu[offset] |= SMS_DCS_CODING_8BIT;
}
+ offset++;
/* ----------- TP-Validity-Period (1 byte): 4 days ----------- */
/* Only if TP-VPF was set in first byte */