# HG changeset patch # User Carl Byington # Date 1252781048 25200 # Node ID 093e0e9248bb63b52d59af0a97bd80cc2be702dc # Parent 9d6bb722d0fe375b44e3b91db911c6e42c617c5d cleanup rfc822 embedded message code diff -r 9d6bb722d0fe -r 093e0e9248bb ChangeLog --- a/ChangeLog Fri Sep 11 12:59:24 2009 -0700 +++ b/ChangeLog Sat Sep 12 11:44:08 2009 -0700 @@ -1,4 +1,4 @@ -LibPST 0.6.43 (2009-09-11) +LibPST 0.6.43 (2009-09-12) =============================== * patches from Justin Greer. add code pages 1200 and 1201 to the list for iconv diff -r 9d6bb722d0fe -r 093e0e9248bb NEWS --- a/NEWS Fri Sep 11 12:59:24 2009 -0700 +++ b/NEWS Sat Sep 12 11:44:08 2009 -0700 @@ -1,4 +1,4 @@ -0.6.43 2009-09-10 patches from Justin Greer, Chris White, Roberto Polli; better rfc822 embedded message decoding +0.6.43 2009-09-12 patches from Justin Greer, Chris White, Roberto Polli; better rfc822 embedded message decoding 0.6.42 2009-09-03 patch from Fridrich Strba to build with DJGPP DOS cross-compiler 0.6.41 2009-06-23 fix ax_python detection - should not use locate command 0.6.40 2009-06-23 fedora 11 has python2.6, remove pdf version of the man pages diff -r 9d6bb722d0fe -r 093e0e9248bb libpst.spec.in --- a/libpst.spec.in Fri Sep 11 12:59:24 2009 -0700 +++ b/libpst.spec.in Sat Sep 12 11:44:08 2009 -0700 @@ -146,13 +146,14 @@ %changelog -* Thu Sep 10 2009 Carl Byington - 0.6.43-1 +* Thu Sep 12 2009 Carl Byington - 0.6.43-1 - decode more of the pst format, some minor bug fixes - add support for code pages 1200 and 1201. - add readpst -t option to select output item types, which can now be used to process folders containing mixed item types. - fix segfault with embedded appointments - add readpst -u option for Thunderbird mode .size and .type files +- better detection of embedded rfc822 message attachments * Thu Sep 03 2009 Carl Byington - 0.6.42-1 - patch from Fridrich Strba to build with DJGPP DOS cross-compiler. diff -r 9d6bb722d0fe -r 093e0e9248bb regression/regression-tests.bash --- a/regression/regression-tests.bash Fri Sep 11 12:59:24 2009 -0700 +++ b/regression/regression-tests.bash Sat Sep 12 11:44:08 2009 -0700 @@ -22,9 +22,12 @@ fn="$2" echo $fn ba=$(basename "$fn" .pst) + size=$(stat -c %s $fn) rm -rf output$n - mkdir output$n - $val ../src/pst2dii -f /usr/share/fonts/bitstream-vera/VeraMono.ttf -B "bates-" -o output$n -O $ba.mydii -d $fn.log $fn >$fn.dii.err 2>&1 + if [ -z "$val" ] || [ $size -lt 10000000 ]; then + mkdir output$n + $val ../src/pst2dii -f /usr/share/fonts/bitstream-vera/VeraMono.ttf -B "bates-" -o output$n -O $ba.mydii -d $fn.log $fn >$fn.dii.err 2>&1 + fi } @@ -34,9 +37,12 @@ fn="$2" echo $fn ba=$(basename "$fn" .pst) + size=$(stat -c %s $fn) rm -rf output$n - mkdir output$n - $val ../src/pst2ldif -d $ba.ldif.log -b 'o=ams-cc.com, c=US' -c 'inetOrgPerson' $fn >$ba.ldif.err 2>&1 + if [ -z "$val" ] || [ $size -lt 10000000 ]; then + mkdir output$n + $val ../src/pst2ldif -d $ba.ldif.log -b 'o=ams-cc.com, c=US' -c 'inetOrgPerson' $fn >$ba.ldif.err 2>&1 + fi } @@ -46,18 +52,20 @@ fn="$2" echo $fn ba=$(basename "$fn" .pst) + size=$(stat -c %s $fn) jobs="" - [ -n "$val" ] && jobs="-j 0" - [ "$regression" == "yes" ] && jobs="-j 0" + [ -n "$val" ] && jobs="-j 0" rm -rf output$n - mkdir output$n - if [ "$regression" == "yes" ]; then - $val ../src/readpst $jobs -te -r -D -cv -o output$n $fn >$ba.err 2>&1 - else - #val ../src/readpst $jobs -r -D -cv -o output$n $fn - $val ../src/readpst $jobs -r -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 - #$val ../src/readpst $jobs -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 - #../src/getidblock -p $fn 0 >$ba.fulldump + if [ -z "$val" ] || [ $size -lt 10000000 ]; then + mkdir output$n + if [ "$regression" == "yes" ]; then + $val ../src/readpst $jobs -te -r -cv -o output$n $fn >$ba.err 2>&1 + else + #val ../src/readpst $jobs -r -D -cv -o output$n $fn + $val ../src/readpst $jobs -te -r -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 + #$val ../src/readpst $jobs -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 + #../src/getidblock -p $fn 0 >$ba.fulldump + fi fi } @@ -70,14 +78,15 @@ rm -rf output* *.err *.log +v="valgrind --leak-check=full" +val="" + func="dopst" [ "$1" == "pst" ] && func="dopst" +[ "$1" == "pstv" ] && func="dopst" && val=$v [ "$1" == "ldif" ] && func="doldif" [ "$1" == "dii" ] && func="dodii" -val="valgrind --leak-check=full" -val="" - regression="" [ "$2" == "reg" ] && regression="yes" [ "$regression" == "yes" ] && val="" diff -r 9d6bb722d0fe -r 093e0e9248bb src/readpst.c --- a/src/readpst.c Fri Sep 11 12:59:24 2009 -0700 +++ b/src/readpst.c Sat Sep 12 11:44:08 2009 -0700 @@ -1575,18 +1575,13 @@ pst_convert_utf8_null(item, &attach->mimetype); DEBUG_INFO(("Attempting Attachment encoding\n")); if (attach->method == PST_ATTACH_EMBEDDED) { - DEBUG_INFO(("seem to have special embedded message attachment\n")); - char *m = NULL; + DEBUG_INFO(("have an embedded rfc822 message attachment\n")); if (attach->mimetype.str) { - DEBUG_INFO(("already has a mime-type of %s\n", attach->mimetype.str)); + DEBUG_INFO(("which already has a mime-type of %s\n", attach->mimetype.str)); free(attach->mimetype.str); } attach->mimetype.str = strdup(RFC822); attach->mimetype.is_utf8 = 1; - write_embedded_message(f_output, attach, boundary, pst, &m); - } - else if (!attach->data.data && attach->mimetype.str && !strcmp(attach->mimetype.str, RFC822)) { - DEBUG_INFO(("seem to have embedded message attachment\n")); find_rfc822_headers(extra_mime_headers); write_embedded_message(f_output, attach, boundary, pst, extra_mime_headers); } diff -r 9d6bb722d0fe -r 093e0e9248bb xml/libpst.in --- a/xml/libpst.in Fri Sep 11 12:59:24 2009 -0700 +++ b/xml/libpst.in Sat Sep 12 11:44:08 2009 -0700 @@ -35,7 +35,7 @@ - 2009-06-06 + 2009-09-12 @@ -245,7 +245,7 @@ - 2009-06-06 + 2009-09-12 @@ -340,7 +340,7 @@ - 2009-06-06 + 2009-09-12 @@ -508,7 +508,7 @@ - 2009-06-06 + 2009-09-12 @@ -641,7 +641,7 @@ - 2009-06-06 + 2009-09-12