sms: allow parts with neither text nor data only in Status Report PDUs

This commit is contained in:
Aleksander Morgado
2012-09-11 16:35:46 +02:00
parent 83ab63138c
commit bdf0f9484b

View File

@@ -1210,11 +1210,12 @@ assemble_sms (MMSms *self,
} }
/* When the user creates the SMS, it will have either 'text' or 'data', /* When the user creates the SMS, it will have either 'text' or 'data',
* not both */ * not both. Also status report PDUs may not have neither text nor data. */
parttext = mm_sms_part_get_text (sorted_parts[idx]); parttext = mm_sms_part_get_text (sorted_parts[idx]);
partdata = mm_sms_part_get_data (sorted_parts[idx]); partdata = mm_sms_part_get_data (sorted_parts[idx]);
if (!parttext && !partdata) { if (!parttext && !partdata &&
mm_sms_part_get_pdu_type (sorted_parts[idx]) != MM_SMS_PDU_TYPE_STATUS_REPORT) {
g_set_error (error, g_set_error (error,
MM_CORE_ERROR, MM_CORE_ERROR,
MM_CORE_ERROR_FAILED, MM_CORE_ERROR_FAILED,