diff options
Diffstat (limited to 'camel/camel-mime-part-utils.c')
-rw-r--r-- | camel/camel-mime-part-utils.c | 23 |
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"); } |