[evolution] Bug 701483 - Inline GPG decryption sometimes hides the decrypted text



commit 553f8555b2dd38233fca5f1686d8fbfa4b910f10
Author: Milan Crha <mcrha redhat com>
Date:   Mon Jun 22 19:26:17 2015 +0200

    Bug 701483 - Inline GPG decryption sometimes hides the decrypted text

 em-format/e-mail-parser-inlinepgp-encrypted.c      |    4 ++--
 em-format/e-mail-parser-inlinepgp-signed.c         |    4 ++--
 em-format/e-mail-parser-multipart-encrypted.c      |    4 ++--
 em-format/e-mail-parser-multipart-signed.c         |    4 ++--
 em-format/e-mail-parser.c                          |    6 +++---
 .../text-highlight/e-mail-parser-text-highlight.c  |    2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/em-format/e-mail-parser-inlinepgp-encrypted.c b/em-format/e-mail-parser-inlinepgp-encrypted.c
index 30c4377..56d5fc5 100644
--- a/em-format/e-mail-parser-inlinepgp-encrypted.c
+++ b/em-format/e-mail-parser-inlinepgp-encrypted.c
@@ -118,10 +118,10 @@ empe_inlinepgp_encrypted_parse (EMailParserExtension *extension,
        len = part_id->len;
        g_string_append (part_id, ".inlinepgp_encrypted");
 
-       e_mail_parser_parse_part_as (
+       g_warn_if_fail (e_mail_parser_parse_part_as (
                parser, opart, part_id,
                camel_data_wrapper_get_mime_type (dw),
-               cancellable, &work_queue);
+               cancellable, &work_queue));
 
        g_string_truncate (part_id, len);
 
diff --git a/em-format/e-mail-parser-inlinepgp-signed.c b/em-format/e-mail-parser-inlinepgp-signed.c
index d8620d3..9f08583 100644
--- a/em-format/e-mail-parser-inlinepgp-signed.c
+++ b/em-format/e-mail-parser-inlinepgp-signed.c
@@ -132,8 +132,8 @@ empe_inlinepgp_signed_parse (EMailParserExtension *extension,
        len = part_id->len;
        g_string_append (part_id, ".inlinepgp_signed");
 
-       e_mail_parser_parse_part (
-               parser, opart, part_id, cancellable, &work_queue);
+       g_warn_if_fail (e_mail_parser_parse_part (
+               parser, opart, part_id, cancellable, &work_queue));
 
        head = g_queue_peek_head_link (&work_queue);
 
diff --git a/em-format/e-mail-parser-multipart-encrypted.c b/em-format/e-mail-parser-multipart-encrypted.c
index 360e2f5..dff97b3 100644
--- a/em-format/e-mail-parser-multipart-encrypted.c
+++ b/em-format/e-mail-parser-multipart-encrypted.c
@@ -114,8 +114,8 @@ empe_mp_encrypted_parse (EMailParserExtension *extension,
        len = part_id->len;
        g_string_append (part_id, ".encrypted");
 
-       e_mail_parser_parse_part (
-               parser, opart, part_id, cancellable, &work_queue);
+       g_warn_if_fail (e_mail_parser_parse_part (
+               parser, opart, part_id, cancellable, &work_queue));
 
        g_string_truncate (part_id, len);
 
diff --git a/em-format/e-mail-parser-multipart-signed.c b/em-format/e-mail-parser-multipart-signed.c
index ab67cee..c467ec7 100644
--- a/em-format/e-mail-parser-multipart-signed.c
+++ b/em-format/e-mail-parser-multipart-signed.c
@@ -156,8 +156,8 @@ empe_mp_signed_parse (EMailParserExtension *extension,
 
                g_string_append_printf (part_id, ".signed.%d", i);
 
-               e_mail_parser_parse_part (
-                       parser, subpart, part_id, cancellable, &work_queue);
+               g_warn_if_fail (e_mail_parser_parse_part (
+                       parser, subpart, part_id, cancellable, &work_queue));
 
                g_string_truncate (part_id, len);
 
diff --git a/em-format/e-mail-parser.c b/em-format/e-mail-parser.c
index b0edd79..c686a9c 100644
--- a/em-format/e-mail-parser.c
+++ b/em-format/e-mail-parser.c
@@ -497,7 +497,7 @@ e_mail_parser_parse_part (EMailParser *parser,
 {
        CamelContentType *ct;
        gchar *mime_type;
-       gint n_parts_queued = 0;
+       gint handled;
 
        ct = camel_mime_part_get_content_type (part);
        if (!ct) {
@@ -509,7 +509,7 @@ e_mail_parser_parse_part (EMailParser *parser,
                g_free (tmp);
        }
 
-       n_parts_queued = e_mail_parser_parse_part_as (
+       handled = e_mail_parser_parse_part_as (
                parser, part, part_id, mime_type,
                cancellable, out_mail_parts);
 
@@ -517,7 +517,7 @@ e_mail_parser_parse_part (EMailParser *parser,
                g_free (mime_type);
        }
 
-       return n_parts_queued;
+       return handled;
 }
 
 gboolean
diff --git a/modules/text-highlight/e-mail-parser-text-highlight.c 
b/modules/text-highlight/e-mail-parser-text-highlight.c
index e27c2b3..f1acc97 100644
--- a/modules/text-highlight/e-mail-parser-text-highlight.c
+++ b/modules/text-highlight/e-mail-parser-text-highlight.c
@@ -59,7 +59,7 @@ empe_text_highlight_parse (EMailParserExtension *extension,
        gint len;
 
        /* Prevent recursion */
-       if (strstr (part_id->str, ".text-highlight") != NULL)
+       if (g_str_has_suffix (part_id->str, ".text-highlight"))
                return FALSE;
 
        /* Don't parse text/html if it's not an attachment */


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