sms: fix error return when a mandatory parameter missing in dictionary

This commit is contained in:
Aleksander Morgado
2012-09-12 11:40:06 +02:00
parent baf3ed0c64
commit 15be01d4fa

View File

@@ -1438,7 +1438,7 @@ mm_sms_new_from_properties (MMBaseModem *modem,
guint n_parts;
MMSmsEncoding encoding;
/* Don't create SMS from properties if either text or number is missing */
/* Don't create SMS from properties if either (text|data) or number is missing */
if (!mm_sms_properties_get_number (properties) ||
(!mm_sms_properties_get_text (properties) &&
!mm_sms_properties_get_data (properties, NULL))) {
@@ -1448,6 +1448,7 @@ mm_sms_new_from_properties (MMBaseModem *modem,
"Cannot create SMS: mandatory parameter '%s' is missing",
(!mm_sms_properties_get_number (properties)?
"number" : "text' or 'data"));
return NULL;
}
split_text = mm_sms_part_util_split_text (mm_sms_properties_get_text (properties),