[evolution] Bug #630295 - Inline GPG encrypted message is not always recognized
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #630295 - Inline GPG encrypted message is not always recognized
- Date: Tue, 5 Oct 2010 11:59:32 +0000 (UTC)
commit a2b2b88a9013098eb4ded36f3e17e6956561f975
Author: Milan Crha <mcrha redhat com>
Date: Tue Oct 5 13:58:00 2010 +0200
Bug #630295 - Inline GPG encrypted message is not always recognized
mail/em-inline-filter.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c
index c1376fc..010a381 100644
--- a/mail/em-inline-filter.c
+++ b/mail/em-inline-filter.c
@@ -152,7 +152,7 @@ inline_filter_scan (CamelMimeFilter *f, gchar *in, gsize len, gint final)
EMInlineFilter *emif = (EMInlineFilter *)f;
gchar *inptr = in, *inend = in+len;
gchar *data_start = in;
- gchar *start;
+ gchar *start = in;
while (inptr < inend) {
gint rest_len;
@@ -292,9 +292,13 @@ inline_filter_scan (CamelMimeFilter *f, gchar *in, gsize len, gint final)
/* always stop as plain, especially when not read those tags fully */
emif->state = EMIF_PLAIN;
- inline_filter_add_part (emif, data_start, inend-data_start);
+ inline_filter_add_part (emif, data_start, inend - data_start);
+ } else if (start > data_start) {
+ /* backup the last line, in case the tag is divided within buffers */
+ camel_mime_filter_backup (f, start, inend - start);
+ g_byte_array_append (emif->data, (guchar *)data_start, start - data_start);
} else {
- g_byte_array_append (emif->data, (guchar *)data_start, inend-data_start);
+ g_byte_array_append (emif->data, (guchar *)data_start, inend - data_start);
}
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]