From 3bd58106efb22b78e6fbabe9307880338ae92746 Mon Sep 17 00:00:00 2001 From: bertrand Date: Wed, 9 Feb 2000 20:35:35 +0000 Subject: various typo fixes in the ctree construction. 2000-02-09 bertrand * tests/ui-tests/message-browser.c: various typo fixes in the ctree construction. * camel/string-utils.c (string_trim): fix braindead trailing trim bug. * camel/gmime-content-field.c (gmime_content_field_construct_from_string): strip the leading and trailing quotes when constructing the content field. This should be done in a more generic RFC822 approach, but this fixes a bug that prevent matt from analysing some multipart messages. * camel/camel-data-wrapper.h: reorganize the deprecated and new methods. * camel/providers/mbox/camel-mbox-folder.c (_check_get_or_maybe_generate_summary_file): Use "From " as the message separating string. * camel/providers/mbox/camel-mbox-folder.c (_append_message): set the mode when creating the mbox file. * camel/providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): ditto * camel/providers/mbox/camel-mbox-summary.c (camel_mbox_save_summary): ditto svn path=/trunk/; revision=1711 --- camel/gmime-content-field.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'camel/gmime-content-field.c') diff --git a/camel/gmime-content-field.c b/camel/gmime-content-field.c index 0a72246a0d..3c1f4fbc7b 100644 --- a/camel/gmime-content-field.c +++ b/camel/gmime-content-field.c @@ -309,21 +309,30 @@ gmime_content_field_construct_from_string (GMimeContentField *content_field, con first = 0; len = strlen (string); - if (!len) return; + if (!len) { + CAMEL_LOG_FULL_DEBUG ( "GMimeContentField::construct_from_string, leaving\n"); + return; + } CAMEL_LOG_FULL_DEBUG ("GMimeContentField::construct_from_string, All checks done\n"); - + CAMEL_LOG_FULL_DEBUG ("GMimeContentField::construct_from_string the complete header is\n" + "-------------------\n%s\n-------------------\n", string); /* find the type */ while ( (itype = type; CAMEL_LOG_TRACE ( "GMimeContentField::construct_from_string, Found mime type : \"%s\"\n", type); if (i >= len-1) { content_field->subtype = NULL; - return; + + CAMEL_LOG_FULL_DEBUG ( "GMimeContentField::construct_from_string only found the type leaving\n"); + return; } first = i+1; @@ -332,10 +341,13 @@ gmime_content_field_construct_from_string (GMimeContentField *content_field, con while ( (isubtype = subtype; CAMEL_LOG_TRACE ( "GMimeContentField::construct_from_string, Found mime subtype: \"%s\"\n", subtype); - if (i >= len-1) return; + if (i >= len-1) { + CAMEL_LOG_FULL_DEBUG ( "GMimeContentField::construct_from_string found the subtype but no parameter, leaving\n"); + return; + } } } first = i+1; @@ -348,7 +360,7 @@ gmime_content_field_construct_from_string (GMimeContentField *content_field, con else { /* we have found parameter name */ param_name = g_strndup (string+first, i-first); - string_trim (param_name, " ", STRING_TRIM_STRIP_TRAILING | STRING_TRIM_STRIP_LEADING); + string_trim (param_name, " \"", STRING_TRIM_STRIP_TRAILING | STRING_TRIM_STRIP_LEADING); i++; first = i; /* Let's find parameter value */ @@ -356,7 +368,7 @@ gmime_content_field_construct_from_string (GMimeContentField *content_field, con if (i != first) param_value = g_strndup (string+first, i-first); else param_value = g_strdup (""); CAMEL_LOG_TRACE ( "GMimeContentField::construct_from_string, Found mime parameter \"%s\"=\"%s\"\n", param_name, param_value); - string_trim (param_value, " \t", STRING_TRIM_STRIP_TRAILING | STRING_TRIM_STRIP_LEADING); + string_trim (param_value, " \t\"", STRING_TRIM_STRIP_TRAILING | STRING_TRIM_STRIP_LEADING); gmime_content_field_set_parameter (content_field, param_name, param_value); g_free (param_name); g_free (param_value); -- cgit v1.2.3