Invitation shown as "Unknown" when sent from EAS account and received sending failure... 78/94978/1
authorSan Cho <san.cho@samsung.com>
Thu, 16 Jun 2016 02:49:55 +0000 (11:49 +0900)
committerintae jeon <intae.jeon@samsung.com>
Wed, 2 Nov 2016 05:20:17 +0000 (22:20 -0700)
[Problem] Invitation shown as "Unknown" when sent from EAS account and received sending failure server email and tried to open it from .eml attachment.
[Cause & Measure] Cause: In parsing mime, "unknwon" is set as its name before checking content subtype as "calendar".
Measure: Checking content subtype first if it is calendar then set its name as "unknown" if it is not calendar type.

Change-Id: I2ba5ee8368d397b152d395db1e073e9d290c672d
(cherry picked from commit 0b852a62cfab550334d367cf8d5f5f93b71c107f)

email-core/email-core-gmime.c

index ac34b2e..f16b8b8 100755 (executable)
@@ -1199,8 +1199,8 @@ static void emcore_gmime_eml_parse_foreach_cb(GMimeObject *parent, GMimeObject *
                        if (disposition_filename) file->name = g_strdup(disposition_filename);
                        else if (ctype_name) file->name = g_strdup(ctype_name);
                        else if (content_id) file->name = g_strdup(content_id);
-                       else if (content_disposition_type == ATTACHMENT) file->name = g_strdup("unknown");
                        else if (ctype_subtype && g_ascii_strcasecmp(ctype_subtype, "calendar") == 0) file->name = g_strdup("invite.vcs");
+                       else if (content_disposition_type == ATTACHMENT) file->name = g_strdup("unknown");
                        else file->name = g_strdup("delivery-status");
                        file->content_id = g_strdup(content_id);