changeset 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 19b795b6f6a0
children d1f930be4711
files Doxyfile src/libpst.c src/readpst.c
diffstat 3 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Doxyfile	Mon Dec 21 08:18:25 2015 -0800
+++ b/Doxyfile	Tue Dec 22 08:59:46 2015 -0800
@@ -568,8 +568,7 @@
 # directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
-INPUT                  = config.h \
-                         src
+INPUT                  = config.h src
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
--- a/src/libpst.c	Mon Dec 21 08:18:25 2015 -0800
+++ b/src/libpst.c	Tue Dec 22 08:59:46 2015 -0800
@@ -3350,6 +3350,7 @@
         SAFE_FREE_STR(attach->filename1);
         SAFE_FREE_STR(attach->filename2);
         SAFE_FREE_STR(attach->mimetype);
+        SAFE_FREE_STR(attach->content_id);
         SAFE_FREE_BIN(attach->data);
         pst_free_id2(attach->id2_head);
         t = attach->next;
--- 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;