diff src/readpst.c @ 354:843705c25b45

code cleanup; content-id in brackets
author Carl Byington <carl@five-ten-sg.com>
date Tue, 22 Dec 2015 08:59:46 -0800
parents 09dd5299d91c
children 544d57fe6bc6
line wrap: on
line diff
--- a/src/readpst.c	Mon Dec 21 08:18:25 2015 -0800
+++ b/src/readpst.c	Tue Dec 22 08:59:46 2015 -0800
@@ -1191,7 +1191,7 @@
     fprintf(f_output, "Content-Transfer-Encoding: base64\n");
 
     if (attach->content_id.str) {
-        fprintf(f_output, "Content-ID: %s\n", attach->content_id.str);
+        fprintf(f_output, "Content-ID: <%s>\n", attach->content_id.str);
     }
 
     if (attach->filename2.str) {
@@ -1777,7 +1777,6 @@
     if (item->email->encrypted_body.data) {
         pst_item_attach* attach = (pst_item_attach*)pst_malloc(sizeof(pst_item_attach));
         DEBUG_INFO(("Adding encrypted text body as attachment\n"));
-        attach = (pst_item_attach*) pst_malloc(sizeof(pst_item_attach));
         memset(attach, 0, sizeof(pst_item_attach));
         attach->next = item->attach;
         item->attach = attach;
@@ -1789,7 +1788,6 @@
     if (item->email->encrypted_htmlbody.data) {
         pst_item_attach* attach = (pst_item_attach*)pst_malloc(sizeof(pst_item_attach));
         DEBUG_INFO(("Adding encrypted HTML body as attachment\n"));
-        attach = (pst_item_attach*) pst_malloc(sizeof(pst_item_attach));
         memset(attach, 0, sizeof(pst_item_attach));
         attach->next = item->attach;
         item->attach = attach;