diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-04-13 03:55:53 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-04-13 03:55:53 +0800 |
commit | 51e5ae5524c778309800530e1e25fdf74f2226da (patch) | |
tree | cb4b49e313d0ac80d9b47c3f2ffe6e097fe08442 /plugins/mail-to-task | |
parent | 742b2d946553f3317a7cecc21f735441c37e4478 (diff) | |
download | gsoc2013-evolution-51e5ae5524c778309800530e1e25fdf74f2226da.tar.gz gsoc2013-evolution-51e5ae5524c778309800530e1e25fdf74f2226da.tar.zst gsoc2013-evolution-51e5ae5524c778309800530e1e25fdf74f2226da.zip |
Adapt to Camel API changes.
Diffstat (limited to 'plugins/mail-to-task')
-rw-r--r-- | plugins/mail-to-task/mail-to-task.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c index 0ac562d92d..cebf779ee6 100644 --- a/plugins/mail-to-task/mail-to-task.c +++ b/plugins/mail-to-task/mail-to-task.c @@ -171,10 +171,11 @@ static void set_description (ECalComponent *comp, CamelMimeMessage *message) { CamelDataWrapper *content; - CamelStream *mem; + CamelStream *stream; CamelContentType *type; CamelMimePart *mime_part = CAMEL_MIME_PART (message); ECalComponentText text; + GByteArray *byte_array; GSList sl; gchar *str, *convert_str = NULL; gsize bytes_read, bytes_written; @@ -200,11 +201,11 @@ set_description (ECalComponent *comp, CamelMimeMessage *message) if (!camel_content_type_is (type, "text", "plain")) return; - mem = camel_stream_mem_new (); - camel_data_wrapper_decode_to_stream (content, mem); - - str = g_strndup ((const gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len); - camel_object_unref (mem); + byte_array = g_byte_array_new (); + stream = camel_stream_mem_new_with_byte_array (byte_array); + camel_data_wrapper_decode_to_stream (content, stream); + str = g_strndup ((gchar *) byte_array->data, byte_array->len); + camel_object_unref (stream); /* convert to UTF-8 string */ if (str && content->mime_type->params && content->mime_type->params->value) { |