diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-05-25 06:43:31 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-05-25 06:43:31 +0800 |
commit | 34d05a6f6f0faefb5dffa2970cc6624ef886beb0 (patch) | |
tree | 219ff1a351fdeeccfd3612edb4f8412035a38d8d /camel | |
parent | f1e6e913a674ce5deb47611a3d1d2ed3047a644c (diff) | |
download | gsoc2013-evolution-34d05a6f6f0faefb5dffa2970cc6624ef886beb0.tar.gz gsoc2013-evolution-34d05a6f6f0faefb5dffa2970cc6624ef886beb0.tar.zst gsoc2013-evolution-34d05a6f6f0faefb5dffa2970cc6624ef886beb0.zip |
Helps if we allocate enough space here. Also, start smoking the same
2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-folder.c (content_info_get_part_spec):
Helps if we allocate enough space here. Also, start smoking the
same purple flavoured IMAP crack when counting parts (parts don't
count if their parent part is a message/* part with a parent
part). Fixes bug #25260.
svn path=/trunk/; revision=17014
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 8 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 14 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 2 |
3 files changed, 20 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 9a7563608d..4420b1fde2 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,13 @@ 2002-05-24 Jeffrey Stedfast <fejj@ximian.com> + * providers/imap/camel-imap-folder.c (content_info_get_part_spec): + Helps if we allocate enough space here. Also, start smoking the + same purple flavoured IMAP crack when counting parts (parts don't + count if their parent part is a message/* part with a parent + part). Fixes bug #25260. + +2002-05-24 Jeffrey Stedfast <fejj@ximian.com> + * providers/imap/camel-imap-command.c (imap_read_untagged): Use the new readline function. diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index f8d3a59594..0b9f785d21 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -1526,6 +1526,12 @@ content_info_get_part_spec (CamelMessageContentInfo *ci) while (node->parent) { CamelMessageContentInfo *child; + /* FIXME: is this only supposed to apply if 'node' is a multipart? */ + if (node->parent->parent && header_content_type_is (node->parent->type, "message", "*")) { + node = node->parent; + continue; + } + child = node->parent->childs; for (part = 1; child; part++) { if (child == node) @@ -1536,7 +1542,7 @@ content_info_get_part_spec (CamelMessageContentInfo *ci) part_spec_push (&stack, part); - len++; + len += 2; while ((part = part / 10)) len++; @@ -1581,7 +1587,7 @@ get_content (CamelImapFolder *imap_folder, const char *uid, camel_multipart_set_boundary (body_mp, NULL); speclen = strlen (part_spec); - child_spec = g_malloc (speclen + 16); + child_spec = g_malloc (speclen + 17); /* dot + 10 + dot + MIME + nul */ memcpy (child_spec, part_spec, speclen); if (speclen > 0) child_spec[speclen++] = '.'; @@ -1607,9 +1613,10 @@ get_content (CamelImapFolder *imap_folder, const char *uid, content = get_content (imap_folder, uid, part, ci, ex); } + if (!stream || !content) { - g_free (child_spec); camel_object_unref (CAMEL_OBJECT (body_mp)); + g_free (child_spec); return NULL; } @@ -1620,6 +1627,7 @@ get_content (CamelImapFolder *imap_folder, const char *uid, ci = ci->next; } + g_free (child_spec); return (CamelDataWrapper *)body_mp; diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index b97f8c0f1a..f45531145d 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -2271,7 +2271,7 @@ camel_imap_store_readline (CamelImapStore *store, char **dest, CamelException *e #if d(!)0 if (camel_verbose_debug) { fprintf (stderr, "received: "); - fwrite (*dest, 1, nread, stderr); + fwrite (ba->data, 1, ba->len, stderr); } #endif |