[evolution-exchange] Bug #617510 - Displays source of a message sent by RoadSync 5



commit 851a9603e2fe6075f868c466e8b66af65d0de4e9
Author: Milan Crha <mcrha redhat com>
Date:   Mon May 10 14:22:23 2010 +0200

    Bug #617510 - Displays source of a message sent by RoadSync 5

 camel/camel-exchange-folder.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/camel/camel-exchange-folder.c b/camel/camel-exchange-folder.c
index 5d16a05..aafdbfb 100644
--- a/camel/camel-exchange-folder.c
+++ b/camel/camel-exchange-folder.c
@@ -497,6 +497,22 @@ exchange_folder_get_message (CamelFolder *folder,
 	if (!ba)
 		return NULL;
 
+	while ((ba->len > 10 && g_str_has_prefix ((const gchar *)ba->data, "MAIL FROM:")) ||
+	       (ba->len >  8 && g_str_has_prefix ((const gchar *)ba->data, "RCPT TO:")) ||
+	       (ba->len >  2 && (ba->data[0] == '\n' || ba->data[1] == '\n'))) {
+		guint i;
+
+		i = 0;
+		while (i < ba->len && ba->data[i] != '\n')
+			i++;
+
+		if (i < ba->len)
+			g_byte_array_remove_range (ba, 0, i + 1);
+		else
+			break;
+	}
+
+
 	stream = camel_stream_mem_new_with_byte_array (ba);
 
 	crlffilter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_DECODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]