aboutsummaryrefslogtreecommitdiffstats
path: root/camel/gmime-utils.c
diff options
context:
space:
mode:
authorBertrand Guiheneuf <bertrand@src.gnome.org>1999-08-03 21:16:35 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-08-03 21:16:35 +0800
commit382308f44a4ab93659f9f54c8dac2c2cc381a471 (patch)
tree40d0f4d6d70f8ee6a8a01b7f9c6bf310732455d0 /camel/gmime-utils.c
parente9c6d8921cce940e590f763a881794323a9e6703 (diff)
downloadgsoc2013-evolution-382308f44a4ab93659f9f54c8dac2c2cc381a471.tar.gz
gsoc2013-evolution-382308f44a4ab93659f9f54c8dac2c2cc381a471.tar.zst
gsoc2013-evolution-382308f44a4ab93659f9f54c8dac2c2cc381a471.zip
There is a probleme here. We can not allow mime part content-type field
* camel/camel-mime-part.c (_set_content_object): There is a probleme here. We can not allow mime part content-type field and content_object mime-type to be different. I thus chosed to set mime part object content field to be freed (if necessary) and set to be a pointer to content_object mime type field. (_construct_from_stream): set content_object mime type to be the same as mime_part's one. This is necessary because we use _set_content_type. This two things are a bit hackish ansd may need to be redesigned. svn path=/trunk/; revision=1071
Diffstat (limited to 'camel/gmime-utils.c')
-rw-r--r--camel/gmime-utils.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/camel/gmime-utils.c b/camel/gmime-utils.c
index 7698d01039..24986d48a3 100644
--- a/camel/gmime-utils.c
+++ b/camel/gmime-utils.c
@@ -32,18 +32,14 @@ gmime_write_header_pair_to_stream (CamelStream *stream, const gchar* name, const
{
gchar *strtmp;
- guint len;
+
CAMEL_LOG_FULL_DEBUG ( "gmime_write_header_pair_to_stream:: Entering\n");
g_assert(name);
-#warning use g_strdup_printf instead
-
- if (!value) return;
- len = strlen (name) + strlen (value) +4;
- /* 4 is for ": " and "\n\0" */
- strtmp = g_new (gchar, len);
- sprintf (strtmp, "%s: %s\n", name, value);
+
+ if (!value) return;
+ strtmp = g_strdup_printf ("%s: %s\n", name, value);
- camel_stream_write (stream, strtmp, len);
+ camel_stream_write_string (stream, strtmp);
CAMEL_LOG_FULL_DEBUG ( "gmime_write_header_pair_to_stream:\n writing %s\n", strtmp);
g_free (strtmp);