[evolution-exchange/gnome-2-30] Bug #617510 - Displays source of a message sent by RoadSync 5
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-exchange/gnome-2-30] Bug #617510 - Displays source of a message sent by RoadSync 5
- Date: Mon, 10 May 2010 12:23:23 +0000 (UTC)
commit c81811577adc7003b6917e9b22c8a9cdd769fc24
Author: Milan Crha <mcrha redhat com>
Date: Mon May 10 14:23:03 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 c45243a..abbad0b 100644
--- a/camel/camel-exchange-folder.c
+++ b/camel/camel-exchange-folder.c
@@ -423,6 +423,22 @@ get_message (CamelFolder *folder, const gchar *uid, CamelException *ex)
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]