X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-tny-msg.c;h=0164e212e024a773ec6e63d9abce5b2c8e4de3b9;hp=59468835802e79ec57252ce68e0243023a09fb99;hb=ae6cc4558ea0f5afc82a06376200904ee7b061dd;hpb=edc519ae28b5934b62922563fd57407e678d8ff3 diff --git a/src/modest-tny-msg.c b/src/modest-tny-msg.c index 5946883..0164e21 100644 --- a/src/modest-tny-msg.c +++ b/src/modest-tny-msg.c @@ -35,6 +35,8 @@ #include #include "modest-formatter.h" #include +#include +#include #include #include @@ -56,7 +58,7 @@ static gboolean is_ascii(const gchar *s); TnyMsg* modest_tny_msg_new (const gchar* mailto, const gchar* from, const gchar *cc, const gchar *bcc, const gchar* subject, const gchar *body, - GSList *attachments) + GList *attachments) { TnyMsg *new_msg; TnyHeader *header; @@ -89,7 +91,7 @@ modest_tny_msg_new (const gchar* mailto, const gchar* from, const gchar *cc, /* Add attachments */ if (attachments) - add_attachments (new_msg, (GList*) attachments); + add_attachments (new_msg, attachments); return new_msg; } @@ -98,7 +100,7 @@ TnyMsg* modest_tny_msg_new_html_plain (const gchar* mailto, const gchar* from, const gchar *cc, const gchar *bcc, const gchar* subject, const gchar *html_body, const gchar *plain_body, - GSList *attachments) + GList *attachments) { TnyMsg *new_msg; TnyHeader *header; @@ -130,7 +132,7 @@ modest_tny_msg_new_html_plain (const gchar* mailto, const gchar* from, const gch g_free (content_type); /* Add attachments */ - add_attachments (new_msg, (GList*) attachments); + add_attachments (new_msg, attachments); return new_msg; } @@ -223,7 +225,7 @@ copy_mime_part (TnyMimePart *part) attachment_cid = tny_mime_part_get_content_id (part); /* fill the stream */ - attachment_stream = tny_mime_part_get_stream (part); + attachment_stream = tny_mime_part_get_stream (part); tny_stream_reset (attachment_stream); tny_mime_part_construct_from_stream (result, attachment_stream, @@ -319,9 +321,10 @@ modest_tny_msg_find_body_part_from_mime_part (TnyMimePart *msg, gboolean want_ht iter = tny_list_create_iterator(parts); /* no parts? assume it's single-part message */ - if (tny_iterator_is_done(iter)) + if (tny_iterator_is_done(iter)) { + g_object_unref (G_OBJECT(iter)); return TNY_MIME_PART (g_object_ref(G_OBJECT(msg))); - else { + } else { gchar *content_type = NULL; do { part = TNY_MIME_PART(tny_iterator_get_current (iter));