aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-part-utils.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>1999-08-29 23:57:47 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-08-29 23:57:47 +0800
commit68a9dad22b742e3034eea24a57a0e7fad3356201 (patch)
tree852a65e1a2c0ab0a8d507bcdc8bba64bf2765be1 /camel/camel-mime-part-utils.c
parente826255bf13255f2b5c626192de4fd10a3885b6f (diff)
downloadgsoc2013-evolution-68a9dad22b742e3034eea24a57a0e7fad3356201.tar
gsoc2013-evolution-68a9dad22b742e3034eea24a57a0e7fad3356201.tar.gz
gsoc2013-evolution-68a9dad22b742e3034eea24a57a0e7fad3356201.tar.bz2
gsoc2013-evolution-68a9dad22b742e3034eea24a57a0e7fad3356201.tar.lz
gsoc2013-evolution-68a9dad22b742e3034eea24a57a0e7fad3356201.tar.xz
gsoc2013-evolution-68a9dad22b742e3034eea24a57a0e7fad3356201.tar.zst
gsoc2013-evolution-68a9dad22b742e3034eea24a57a0e7fad3356201.zip
text parameter declared const
1999-08-28 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-mime-part.c (camel_mime_part_set_text): text parameter declared const * camel/camel-mime-part-utils.c (camel_mime_part_store_stream_in_buffer): actually test correctly nb_bytes_read_chunk is >0 * camel/gstring-util.c: * camel/gmime-content-field.c: * camel/providers/MH/camel-mh-folder.c: * camel/camel-stream-fs.c: include string.h * camel/camel-stream-mem.c (_write): return the numver of written bytes. * camel/camel-stream-buffered-fs.c (_eos): return sthg * camel/camel-stream.c (default_camel_seek): return something. * Started to work on new recipient code. * fixed various leaks. svn path=/trunk/; revision=1146
Diffstat (limited to 'camel/camel-mime-part-utils.c')
-rw-r--r--camel/camel-mime-part-utils.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index 59ae49e595..7fbc3a30fb 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -39,10 +39,10 @@ camel_mime_part_construct_headers_from_stream (CamelMimePart *mime_part,
Rfc822Header *cur_header;
int i;
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart:: "
+ CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils:: "
"Entering _construct_headers_from_stream\n");
g_assert (stream);
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::construct_headers_from_stream "
+ CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_headers_from_stream "
"parsing headers\n");
/*
* parse all header lines
@@ -58,8 +58,8 @@ camel_mime_part_construct_headers_from_stream (CamelMimePart *mime_part,
g_array_free (header_array, TRUE);
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::construct_headers_from_stream "
- "headers parsed \n");
+ CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_headers_from_stream "
+ "headers parsed. Leaving \n");
}
}
@@ -79,7 +79,7 @@ camel_mime_part_construct_content_from_stream (CamelMimePart *mime_part,
/*
* find content mime type
*/
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::construct_content_from_stream "
+ CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_content_from_stream "
"parsing content\n");
content_type = camel_mime_part_get_content_type (mime_part);
@@ -91,7 +91,7 @@ camel_mime_part_construct_content_from_stream (CamelMimePart *mime_part,
* using text/plain is the default
*/
if (!mime_type) {
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::construct_content_from_stream "
+ CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_content_from_stream "
"content type field not found "
"using default \"text/plain\"\n");
mime_type = g_strdup ("text/plain");
@@ -105,7 +105,7 @@ camel_mime_part_construct_content_from_stream (CamelMimePart *mime_part,
content_object_type =
data_wrapper_repository_get_data_wrapper_type (mime_type);
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::construct_content_from_stream content"
+ CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_content_from_stream content"
" type object type used: %s\n",
gtk_type_name (content_object_type));
@@ -124,10 +124,10 @@ camel_mime_part_construct_content_from_stream (CamelMimePart *mime_part,
gtk_object_unref (GTK_OBJECT (content_object));
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::construct_from_stream "
+ CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_from_stream "
"content parsed\n");
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart:: Leaving _construct_from_stream\n");
+ CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils:: Leaving _construct_from_stream\n");
}
@@ -141,6 +141,8 @@ camel_mime_part_store_stream_in_buffer (CamelMimePart *mime_part,
GByteArray *buffer;
#define STREAM_READ_CHUNK_SZ 100
+ CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::store_stream_in_buffer entering\n");
+
if (mime_part->temp_message_buffer == NULL)
mime_part->temp_message_buffer = g_byte_array_new ();
@@ -152,7 +154,7 @@ camel_mime_part_store_stream_in_buffer (CamelMimePart *mime_part,
STREAM_READ_CHUNK_SZ);
nb_bytes_read_total += nb_bytes_read_chunk;
- while (nb_bytes_read_chunk) {
+ while (nb_bytes_read_chunk >0) {
g_byte_array_set_size (buffer, nb_bytes_read_total + STREAM_READ_CHUNK_SZ);
nb_bytes_read_chunk = camel_stream_read (stream,
buffer->data + nb_bytes_read_total,
@@ -161,5 +163,6 @@ camel_mime_part_store_stream_in_buffer (CamelMimePart *mime_part,
}
g_byte_array_set_size (buffer, nb_bytes_read_total);
+ CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::store_stream_in_buffer entering\n");
}