diff options
-rw-r--r-- | src/mm-generic-gsm.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mm-generic-gsm.c b/src/mm-generic-gsm.c index 0a0a3c11..9cfaddcb 100644 --- a/src/mm-generic-gsm.c +++ b/src/mm-generic-gsm.c @@ -3939,7 +3939,7 @@ sms_semi_octets_to_bcd_string (char *dest, const guint8 *octets, int num_octets) *dest++ = '\0'; } -/* len is in septets for gsm7 and in digits (semi-octets) for others */ +/* len is in semi-octets */ static char * sms_decode_address (const guint8 *address, int len) { @@ -3952,7 +3952,7 @@ sms_decode_address (const guint8 *address, int len) if (addrtype == 0xd0) { guint8 *unpacked; guint32 unpacked_len; - unpacked = gsm_unpack (address + 1, len, 0, &unpacked_len); + unpacked = gsm_unpack (address, (len * 4) / 7, 0, &unpacked_len); utf8 = (char *)mm_charset_gsm_unpacked_to_utf8 (unpacked, unpacked_len); g_free(unpacked); @@ -4079,14 +4079,6 @@ sms_parse_pdu (const char *hexpdu) return NULL; } - /* Only handle the basic protocol identifier */ - if (pdu[tp_pid_offset] != 0) { - mm_err ("Unhandled protocol identifier: 0x%02x vs 0x00", - pdu[tp_pid_offset]); - g_free (pdu); - return NULL; - } - smsc_addr = sms_decode_address (&pdu[1], 2 * (pdu[0] - 1)); sender_addr = sms_decode_address (&pdu[msg_start_offset + 2], pdu[msg_start_offset + 1]); |