/*Content - END*/
/*Figure out TEXT or ATTACHMENT(INLINE) ?*/
- if ((!disposition_str && g_ascii_strcasecmp(ctype_type, "text") == 0) &&
+ if ((!disposition_str && ctype_type && g_ascii_strcasecmp(ctype_type, "text") == 0) &&
(g_ascii_strcasecmp(ctype_subtype, "plain") == 0 ||
g_ascii_strcasecmp(ctype_subtype, "html") == 0)) {
EM_DEBUG_LOG("TEXT");
- } else if (parent_ctype_subtype &&
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, GMIME_DISPOSITION_ATTACHMENT) == 0) ||
+ (parent_ctype_subtype && g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0)) {
+ content_disposition_type = ATTACHMENT;
+ EM_DEBUG_LOG("ATTACHMENT");
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, "inline") == 0) ||
+ (parent_ctype_subtype &&
((g_ascii_strncasecmp(parent_ctype_subtype, "related", strlen("related")) == 0) ||
- (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0))) {
+ (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0)))) {
content_disposition_type = INLINE_ATTACHMENT;
EM_DEBUG_LOG("INLINE_ATTACHMENT");
- } else if (parent_ctype_subtype && g_ascii_strcasecmp(parent_ctype_subtype, "mixed") == 0) {
- content_disposition_type = ATTACHMENT;
- EM_DEBUG_LOG("ATTACHMENT");
} else {
int result = false;
if (content_id && (emcore_search_string_from_file(cnt_info->text.html,
g_ascii_strcasecmp(ctype_subtype, "html") == 0)) {
cnt_info->total_body_size += content_size;
EM_DEBUG_LOG("TEXT");
- } else if (parent_ctype_subtype &&
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, GMIME_DISPOSITION_ATTACHMENT) == 0) ||
+ (parent_ctype_subtype && g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0)) {
+ content_disposition_type = ATTACHMENT;
+ cnt_info->total_attachment_size += content_size;
+ EM_DEBUG_LOG("ATTACHMENT");
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, "inline") == 0) ||
+ (parent_ctype_subtype &&
((g_ascii_strncasecmp(parent_ctype_subtype, "related", strlen("related")) == 0) ||
- (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0))) {
+ (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0)))) {
content_disposition_type = INLINE_ATTACHMENT;
cnt_info->total_body_size += content_size;
EM_DEBUG_LOG("INLINE_ATTACHMENT");
- } else if (parent_ctype_subtype &&
- g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0) {
- content_disposition_type = ATTACHMENT;
- cnt_info->total_attachment_size += content_size;
- EM_DEBUG_LOG("ATTACHMENT");
} else {
int result = false;
if (content_id && (emcore_search_string_from_file(cnt_info->text.html,
(g_ascii_strcasecmp(ctype_subtype, "plain") == 0 ||
g_ascii_strcasecmp(ctype_subtype, "html") == 0)) {
EM_DEBUG_LOG("TEXT");
- } else if (parent_ctype_subtype &&
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, GMIME_DISPOSITION_ATTACHMENT) == 0) ||
+ (parent_ctype_subtype && g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0)) {
+ content_disposition_type = ATTACHMENT;
+ EM_DEBUG_LOG("ATTACHMENT");
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, "inline") == 0) ||
+ (parent_ctype_subtype &&
((g_ascii_strncasecmp(parent_ctype_subtype, "related", strlen("related")) == 0) ||
- (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0))) {
+ (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0)))) {
content_disposition_type = INLINE_ATTACHMENT;
EM_DEBUG_LOG("INLINE_ATTACHMENT");
- } else if (parent_ctype_subtype &&
- g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0) {
- content_disposition_type = ATTACHMENT;
- EM_DEBUG_LOG("ATTACHMENT");
} else {
int result = false;
if (content_id && (emcore_search_string_from_file(cnt_info->text.html,
parent_ctype = g_mime_object_get_content_type(parent);
parent_ctype_type = (char *)g_mime_content_type_get_media_type(parent_ctype);
parent_ctype_subtype = (char *)g_mime_content_type_get_media_subtype(parent_ctype);
- EM_DEBUG_LOG("Content-type[%s/%s]", parent_ctype_type, parent_ctype_subtype);
+ EM_DEBUG_LOG("Parent Content-type[%s/%s]", parent_ctype_type, parent_ctype_subtype);
/*Content Type*/
ctype = g_mime_object_get_content_type(mobject);
(g_ascii_strcasecmp(ctype_subtype, "plain") == 0 ||
g_ascii_strcasecmp(ctype_subtype, "html") == 0)) {
EM_DEBUG_LOG("TEXT");
- } else if (parent_ctype_subtype &&
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, GMIME_DISPOSITION_ATTACHMENT) == 0) ||
+ (parent_ctype_subtype && g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0)) {
+ content_disposition_type = ATTACHMENT;
+ EM_DEBUG_LOG("ATTACHMENT");
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, "inline") == 0) ||
+ (parent_ctype_subtype &&
((g_ascii_strncasecmp(parent_ctype_subtype, "related", strlen("related")) == 0) ||
- (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0))) {
+ (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0)))) {
content_disposition_type = INLINE_ATTACHMENT;
EM_DEBUG_LOG("INLINE_ATTACHMENT");
- } else if (parent_ctype_subtype &&
- g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0) {
- content_disposition_type = ATTACHMENT;
- EM_DEBUG_LOG("ATTACHMENT");
} else {
int result = false;
if (content_id && (emcore_search_string_from_file(cnt_info->text.html,
parent_ctype = g_mime_object_get_content_type(parent);
parent_ctype_type = (char *)g_mime_content_type_get_media_type(parent_ctype);
parent_ctype_subtype = (char *)g_mime_content_type_get_media_subtype(parent_ctype);
- EM_DEBUG_LOG("Content-type[%s/%s]", parent_ctype_type, parent_ctype_subtype);
+ EM_DEBUG_LOG("Parent Content-type[%s/%s]", parent_ctype_type, parent_ctype_subtype);
/* Parent content type - END */
/*Content Type*/
g_ascii_strcasecmp(ctype_subtype, "html") == 0)) {
cnt_info->total_body_size += content_size;
EM_DEBUG_LOG("TEXT");
- } else if (parent_ctype_subtype &&
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, GMIME_DISPOSITION_ATTACHMENT) == 0) ||
+ (parent_ctype_subtype && g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0)) {
+ content_disposition_type = ATTACHMENT;
+ cnt_info->total_attachment_size += content_size;
+ EM_DEBUG_LOG("ATTACHMENT");
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, "inline") == 0) ||
+ (parent_ctype_subtype &&
((g_ascii_strncasecmp(parent_ctype_subtype, "related", strlen("related")) == 0) ||
- (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0))) {
+ (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0)))) {
content_disposition_type = INLINE_ATTACHMENT;
cnt_info->total_body_size += content_size;
EM_DEBUG_LOG("INLINE_ATTACHMENT");
- } else if (parent_ctype_subtype &&
- g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0) {
- content_disposition_type = ATTACHMENT;
- cnt_info->total_attachment_size += content_size;
- EM_DEBUG_LOG("ATTACHMENT");
} else {
if (disposition_str && g_ascii_strcasecmp(disposition_str, GMIME_DISPOSITION_ATTACHMENT) == 0) {
content_disposition_type = ATTACHMENT;
(g_ascii_strcasecmp(ctype_subtype, "plain") == 0 ||
g_ascii_strcasecmp(ctype_subtype, "html") == 0)) {
EM_DEBUG_LOG("TEXT");
- } else if (parent_ctype_subtype &&
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, GMIME_DISPOSITION_ATTACHMENT) == 0) ||
+ (parent_ctype_subtype && g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0)) {
+ content_disposition_type = ATTACHMENT;
+ EM_DEBUG_LOG("ATTACHMENT");
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, "inline") == 0) ||
+ (parent_ctype_subtype &&
((g_ascii_strncasecmp(parent_ctype_subtype, "related", strlen("related")) == 0) ||
- (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0))) {
+ (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0)))) {
content_disposition_type = INLINE_ATTACHMENT;
EM_DEBUG_LOG("INLINE_ATTACHMENT");
- } else if (parent_ctype_subtype &&
- g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0) {
- content_disposition_type = ATTACHMENT;
- EM_DEBUG_LOG("ATTACHMENT");
} else {
if (disposition_str && g_ascii_strcasecmp(disposition_str, GMIME_DISPOSITION_ATTACHMENT) == 0) {
content_disposition_type = ATTACHMENT;
(g_ascii_strcasecmp(ctype_subtype, "plain") == 0 ||
g_ascii_strcasecmp(ctype_subtype, "html") == 0)) {
EM_DEBUG_LOG("TEXT");
- } else if (parent_ctype_subtype &&
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, GMIME_DISPOSITION_ATTACHMENT) == 0) ||
+ (parent_ctype_subtype && g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0)) {
+ content_disposition_type = ATTACHMENT;
+ EM_DEBUG_LOG("ATTACHMENT");
+ } else if ((disposition_str && g_ascii_strcasecmp(disposition_str, "inline") == 0) ||
+ (parent_ctype_subtype &&
((g_ascii_strncasecmp(parent_ctype_subtype, "related", strlen("related")) == 0) ||
- (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0))) {
+ (g_ascii_strncasecmp(parent_ctype_subtype, "relative", strlen("relative")) == 0)))) {
content_disposition_type = INLINE_ATTACHMENT;
EM_DEBUG_LOG("INLINE_ATTACHMENT");
- } else if (parent_ctype_subtype &&
- g_ascii_strncasecmp(parent_ctype_subtype, "mixed", strlen("mixed")) == 0) {
- content_disposition_type = ATTACHMENT;
- EM_DEBUG_LOG("ATTACHMENT");
} else {
if (disposition_str && g_ascii_strcasecmp(disposition_str, GMIME_DISPOSITION_ATTACHMENT) == 0) {
content_disposition_type = ATTACHMENT;