From d27b52023b0ed91a777bc838e4f9b898ca7e2201 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 4 Sep 2002 03:15:06 +0000 Subject: If we fake the from eof file boundary, also make sure we say we matched 2002-09-04 Not Zed * camel-mime-parser.c (folder_scan_content): If we fake the from eof file boundary, also make sure we say we matched nothing. Also make the end case a little more robust to make sure we expired all hope of finding a sub-boundary. svn path=/trunk/; revision=17961 --- camel/ChangeLog | 5 +++++ camel/camel-mime-parser.c | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 7e65ed67ef..44a7c1b560 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,10 @@ 2002-09-04 Not Zed + * camel-mime-parser.c (folder_scan_content): If we fake the from + eof file boundary, also make sure we say we matched nothing. Also + make the end case a little more robust to make sure we expired all + hope of finding a sub-boundary. + * providers/imap/camel-imap-store.c, providers/imap/camel-imap-folder.c: Lots of changes, too numerous to list. Changed to use camel-imap-store-summary to cache list diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c index ed4f50ca46..a51553d33a 100644 --- a/camel/camel-mime-parser.c +++ b/camel/camel-mime-parser.c @@ -1094,14 +1094,18 @@ folder_scan_skip_line(struct _header_scan_state *s, GByteArray *save) s->atleast = 1; + d(printf("skipping line\n")); + while ( (len = folder_read(s)) > 0 && len > s->atleast) { /* ensure we have at least enough room here */ inptr = s->inptr; inend = s->inend-1; c = -1; while (inptrinptr, inptr-s->inptr); @@ -1433,9 +1437,12 @@ folder_scan_content(struct _header_scan_state *s, int *lastone, char **data, int content: /* treat eof as the last boundary in From mode */ - if (s->scan_from && s->eof) + if (s->scan_from && s->eof && s->atleast <= 1) { onboundary = TRUE; - part = s->parts; + part = NULL; + } else { + part = s->parts; + } normal_exit: s->atleast = atleast; s->inptr = inptr; -- cgit v1.2.3