sms-part: properly skip validity field when given in absolute or enhanced format

We don't support absolute or enhanced format for validity, but we still need to
properly skip those fields if given.

According to GSM 03.40, they are both always 7 bytes, not just 1.
This commit is contained in:
Aleksander Morgado
2013-04-02 16:13:43 +02:00
parent c1e70924d8
commit fc219be4d4

View File

@@ -657,20 +657,24 @@ mm_sms_part_new_from_binary_pdu (guint index,
mm_dbg (" validity available, format relative");
mm_sms_part_set_validity (sms_part,
relative_to_validity (pdu[offset]));
offset++;
break;
case 0x08:
/* TODO: support enhanced format; GSM 03.40 */
mm_dbg (" validity available, format enhanced (not implemented)");
/* 7 bytes for enhanced validity */
offset += 7;
break;
case 0x18:
/* TODO: support absolute format; GSM 03.40 */
mm_dbg (" validity available, format absolute (not implemented)");
/* 7 bytes for absolute validity */
offset += 7;
break;
default:
/* Cannot happen as we AND with the 0x18 mask */
g_assert_not_reached();
}
offset++;
}
tp_user_data_len_offset = offset;