comparison src/readpst.c @ 236:093e0e9248bb stable-0-6-43

cleanup rfc822 embedded message code
author Carl Byington <carl@five-ten-sg.com>
date Sat, 12 Sep 2009 11:44:08 -0700
parents ed0cb66b23d4
children 410b6422d65b
comparison
equal deleted inserted replaced
235:9d6bb722d0fe 236:093e0e9248bb
1573 pst_convert_utf8_null(item, &attach->filename1); 1573 pst_convert_utf8_null(item, &attach->filename1);
1574 pst_convert_utf8_null(item, &attach->filename2); 1574 pst_convert_utf8_null(item, &attach->filename2);
1575 pst_convert_utf8_null(item, &attach->mimetype); 1575 pst_convert_utf8_null(item, &attach->mimetype);
1576 DEBUG_INFO(("Attempting Attachment encoding\n")); 1576 DEBUG_INFO(("Attempting Attachment encoding\n"));
1577 if (attach->method == PST_ATTACH_EMBEDDED) { 1577 if (attach->method == PST_ATTACH_EMBEDDED) {
1578 DEBUG_INFO(("seem to have special embedded message attachment\n")); 1578 DEBUG_INFO(("have an embedded rfc822 message attachment\n"));
1579 char *m = NULL;
1580 if (attach->mimetype.str) { 1579 if (attach->mimetype.str) {
1581 DEBUG_INFO(("already has a mime-type of %s\n", attach->mimetype.str)); 1580 DEBUG_INFO(("which already has a mime-type of %s\n", attach->mimetype.str));
1582 free(attach->mimetype.str); 1581 free(attach->mimetype.str);
1583 } 1582 }
1584 attach->mimetype.str = strdup(RFC822); 1583 attach->mimetype.str = strdup(RFC822);
1585 attach->mimetype.is_utf8 = 1; 1584 attach->mimetype.is_utf8 = 1;
1586 write_embedded_message(f_output, attach, boundary, pst, &m);
1587 }
1588 else if (!attach->data.data && attach->mimetype.str && !strcmp(attach->mimetype.str, RFC822)) {
1589 DEBUG_INFO(("seem to have embedded message attachment\n"));
1590 find_rfc822_headers(extra_mime_headers); 1585 find_rfc822_headers(extra_mime_headers);
1591 write_embedded_message(f_output, attach, boundary, pst, extra_mime_headers); 1586 write_embedded_message(f_output, attach, boundary, pst, extra_mime_headers);
1592 } 1587 }
1593 else if (attach->data.data || attach->i_id) { 1588 else if (attach->data.data || attach->i_id) {
1594 if (mode == MODE_SEPARATE && !mode_MH) 1589 if (mode == MODE_SEPARATE && !mode_MH)