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
This commit is contained in:
committed by
Jeffrey Stedfast
parent
f1e6e913a6
commit
34d05a6f6f
@ -1,3 +1,11 @@
|
||||
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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user