summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSankar P <psankar@novell.com>2008-01-09 06:56:29 +0000
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2008-01-09 06:56:29 +0000
commit3ba883cd32044de6bbed51abb9e1432e0157d73a (patch)
treec1068884524b9ff002ad5650c34a9579ee93644f
parent606b4677bd75a2b83151dc1c84b07388363c45bf (diff)
downloadevolution-data-server-3ba883cd32044de6bbed51abb9e1432e0157d73a.tar.gz
Use the right API to get the mime_type. Accessing Data Wrapper's field
2008-01-09 Sankar P <psankar@novell.com> * camel-mime-part.c: (camel_mime_part_set_filename): Use the right API to get the mime_type. Accessing Data Wrapper's field directly is not advisable. ** Fix for bug #460204 svn path=/branches/gnome-2-20/; revision=8345
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/camel-mime-part.c7
2 files changed, 12 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 03e284de2..c71209535 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2008-01-09 Sankar P <psankar@novell.com>
+
+ * camel-mime-part.c: (camel_mime_part_set_filename):
+ Use the right API to get the mime_type. Accessing Data Wrapper's
+ field directly is not advisable.
+
+ ** Fix for bug #460204
+
2008-01-07 Sankar P <psankar@novell.com>
* camel-partition-table.c: (camel_key_table_add),
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index 946626d41..123272c31 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -446,9 +446,10 @@ camel_mime_part_set_filename (CamelMimePart *mime_part, const char *filename)
camel_medium_set_header (CAMEL_MEDIUM (mime_part),
"Content-Disposition", str);
g_free(str);
-
- camel_content_type_set_param (((CamelDataWrapper *) mime_part)->mime_type, "name", filename);
- str = camel_content_type_format (((CamelDataWrapper *) mime_part)->mime_type);
+
+ camel_content_type_set_param ( (camel_data_wrapper_get_mime_type ((CamelDataWrapper *) mime_part)), "name", filename);
+
+ str = camel_content_type_format ((camel_data_wrapper_get_mime_type ((CamelDataWrapper *) mime_part)));
camel_medium_set_header (CAMEL_MEDIUM (mime_part), "Content-Type", str);
g_free (str);
}