diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-05-19 22:24:41 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-05-20 01:07:20 +0800 |
commit | 794e28d23963fd875c0ffcad9c902f67744393bb (patch) | |
tree | 9570fad34f27fb14303e2f238b1a3172aa21dabf | |
parent | 5bea269ce8a7b2603f30f82f8ef3636795fb0cd0 (diff) | |
download | gsoc2013-evolution-794e28d23963fd875c0ffcad9c902f67744393bb.tar gsoc2013-evolution-794e28d23963fd875c0ffcad9c902f67744393bb.tar.gz gsoc2013-evolution-794e28d23963fd875c0ffcad9c902f67744393bb.tar.bz2 gsoc2013-evolution-794e28d23963fd875c0ffcad9c902f67744393bb.tar.lz gsoc2013-evolution-794e28d23963fd875c0ffcad9c902f67744393bb.tar.xz gsoc2013-evolution-794e28d23963fd875c0ffcad9c902f67744393bb.tar.zst gsoc2013-evolution-794e28d23963fd875c0ffcad9c902f67744393bb.zip |
Add e_mail_part_set_cid().
-rw-r--r-- | em-format/e-mail-parser-text-html.c | 4 | ||||
-rw-r--r-- | em-format/e-mail-part.c | 10 | ||||
-rw-r--r-- | em-format/e-mail-part.h | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/em-format/e-mail-parser-text-html.c b/em-format/e-mail-parser-text-html.c index ae97858a11..b9a4653728 100644 --- a/em-format/e-mail-parser-text-html.c +++ b/em-format/e-mail-parser-text-html.c @@ -80,7 +80,7 @@ empe_text_html_parse (EMailParserExtension *extension, mail_part = e_mail_part_new (part, part_id->str); mail_part->mime_type = g_strdup ("text/html"); - mail_part->cid = cid; + e_mail_part_set_cid (mail_part, cid); g_string_truncate (part_id, len); g_queue_push_head (&work_queue, mail_part); @@ -91,6 +91,8 @@ empe_text_html_parse (EMailParserExtension *extension, e_queue_transfer (&work_queue, out_mail_parts); + g_free (cid); + return TRUE; } diff --git a/em-format/e-mail-part.c b/em-format/e-mail-part.c index 0f4550cae5..15bd309f05 100644 --- a/em-format/e-mail-part.c +++ b/em-format/e-mail-part.c @@ -191,6 +191,16 @@ e_mail_part_get_cid (EMailPart *part) return part->cid; } +void +e_mail_part_set_cid (EMailPart *part, + const gchar *cid) +{ + g_return_if_fail (part != NULL); + + g_free (part->cid); + part->cid = g_strdup (cid); +} + static EMailPartValidityPair * mail_part_find_validity_pair (EMailPart *part, guint32 validity_type) diff --git a/em-format/e-mail-part.h b/em-format/e-mail-part.h index 5c071613a0..e3e2e26aa5 100644 --- a/em-format/e-mail-part.h +++ b/em-format/e-mail-part.h @@ -97,6 +97,8 @@ gsize e_mail_part_get_instance_size (EMailPart *part); const gchar * e_mail_part_get_id (EMailPart *part); const gchar * e_mail_part_get_cid (EMailPart *part); +void e_mail_part_set_cid (EMailPart *part, + const gchar *cid); void e_mail_part_update_validity (EMailPart *part, CamelCipherValidity *validity, guint32 validity_type); |