sync with 0.9.0cvs6
authorPaul Mangan <paul@claws-mail.org>
Wed, 21 May 2003 12:56:40 +0000 (12:56 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 21 May 2003 12:56:40 +0000 (12:56 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/procmime.c

index 2356941..5aec85f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-21
+
+       * src/procmime.c: procmime_scan_multipart_message(): fixed parsing
+         of message/rfc822 parts.
+
 2003-05-21
 
        * src/pop.c: pop3_ok(): detect timeout error.
index 3a3bf27..a607ec3 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-21 [paul]      0.8.11claws171
+
+       * sync with 0.9.0cvs6
+               see ChangeLog 2003-05-21
+
 2003-05-21 [paul]      0.8.11claws170
 
        * sync with 0.9.0cvs5
index 0b1f313..34d9cb5 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-21
+
+       * src/procmime.c: procmime_scan_multipart_message(): message/rfc822
+         ¥Ñ¡¼¥È¤Î¥Ñ¡¼¥¹¤ò½¤Àµ¡£
+
 2003-05-21
 
        * src/pop.c: pop3_ok(): ¥¿¥¤¥à¥¢¥¦¥È¥¨¥é¡¼¤ò¸¡½Ð¡£
index def46eb..48810ef 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws170
+EXTRA_VERSION=claws171
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index b58f886..02e5176 100644 (file)
@@ -237,6 +237,9 @@ void procmime_scan_multipart_message(MimeInfo *mimeinfo, FILE *fp)
                while ((p = fgets(buf, sizeof(buf), fp)) != NULL)
                        if (IS_BOUNDARY(buf, boundary, boundary_len)) break;
                if (!p) return;
+       } else if (mimeinfo->parent && mimeinfo->parent->boundary) {
+               boundary = mimeinfo->parent->boundary;
+               boundary_len = strlen(boundary);
        }
 
        if ((fpos = ftell(fp)) < 0) {
@@ -247,6 +250,7 @@ void procmime_scan_multipart_message(MimeInfo *mimeinfo, FILE *fp)
        for (;;) {
                MimeInfo *partinfo;
                gboolean eom = FALSE;
+               gint len;
 
                prev_fpos = fpos;
                debug_print("prev_fpos: %ld\n", fpos);
@@ -266,6 +270,8 @@ void procmime_scan_multipart_message(MimeInfo *mimeinfo, FILE *fp)
                        partinfo = procmime_scan_mime_header(fp);
                        if (!partinfo) break;
                        procmime_mimeinfo_insert(mimeinfo, partinfo);
+                       debug_print("content-type: %s\n",
+                                   partinfo->content_type);
                }
 
                if (partinfo->mime_type == MIME_MULTIPART ||
@@ -289,10 +295,13 @@ void procmime_scan_multipart_message(MimeInfo *mimeinfo, FILE *fp)
                        buf[0] = '\0';
                        eom = TRUE;
                }
+               debug_print("boundary: %s\n", buf);
+
                fpos = ftell(fp);
                debug_print("fpos: %ld\n", fpos);
 
-               partinfo->size = fpos - prev_fpos - strlen(buf);
+               len = strlen(buf);
+               partinfo->size = fpos - prev_fpos - len;
                debug_print("partinfo->size: %d\n", partinfo->size);
                if (partinfo->sub && !partinfo->sub->sub &&
                    !partinfo->sub->children) {
@@ -301,7 +310,12 @@ void procmime_scan_multipart_message(MimeInfo *mimeinfo, FILE *fp)
                        debug_print("partinfo->sub->size: %d\n",
                                    partinfo->sub->size);
                }
-               debug_print("boundary: %s\n", buf);
+
+               if (mimeinfo->mime_type == MIME_MESSAGE_RFC822) {
+                       if (len > 0 && fseek(fp, fpos - len, SEEK_SET) < 0)
+                               perror("fseek");
+                       break;
+               }
 
                if (eom) break;
        }