aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-parser-inlinepgp-encrypted.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-11-10 11:40:00 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-11-11 04:54:43 +0800
commit2c4ae5e7685c462f8d464448e4617b8dea029e72 (patch)
treec34f0cbb7c500ff70f10fce846631b0a948b341c /em-format/e-mail-parser-inlinepgp-encrypted.c
parent583da46b8caf4b2a8b548b03c38fe0e84164abfb (diff)
downloadgsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.tar.gz
gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.tar.zst
gsoc2013-evolution-2c4ae5e7685c462f8d464448e4617b8dea029e72.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'em-format/e-mail-parser-inlinepgp-encrypted.c')
-rw-r--r--em-format/e-mail-parser-inlinepgp-encrypted.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/em-format/e-mail-parser-inlinepgp-encrypted.c b/em-format/e-mail-parser-inlinepgp-encrypted.c
index ebdc274738..3a61a5eeff 100644
--- a/em-format/e-mail-parser-inlinepgp-encrypted.c
+++ b/em-format/e-mail-parser-inlinepgp-encrypted.c
@@ -85,20 +85,19 @@ empe_inlinepgp_encrypted_parse (EMailParserExtension *extension,
valid = camel_cipher_context_decrypt_sync (
cipher, part, opart, cancellable, &local_error);
- if (!valid) {
+ if (local_error != NULL) {
parts = e_mail_parser_error (
- parser, cancellable,
- _("Could not parse PGP message: %s"),
- local_error->message ?
- local_error->message :
- _("Unknown error"));
- g_clear_error (&local_error);
-
- parts = g_slist_concat (parts,
- e_mail_parser_parse_part_as (parser,
- part, part_id,
- "application/vnd.evolution.source",
- cancellable));
+ parser, cancellable,
+ _("Could not parse PGP message: %s"),
+ local_error->message);
+ g_error_free (local_error);
+
+ parts = g_slist_concat (
+ parts,
+ e_mail_parser_parse_part_as (parser,
+ part, part_id,
+ "application/vnd.evolution.source",
+ cancellable));
g_object_unref (cipher);
g_object_unref (opart);
@@ -136,7 +135,8 @@ empe_inlinepgp_encrypted_parse (EMailParserExtension *extension,
if (!mail_part)
continue;
- e_mail_part_update_validity (mail_part, valid,
+ e_mail_part_update_validity (
+ mail_part, valid,
E_MAIL_PART_VALIDITY_ENCRYPTED |
E_MAIL_PART_VALIDITY_PGP);
}
@@ -156,7 +156,8 @@ empe_inlinepgp_encrypted_parse (EMailParserExtension *extension,
if (button && button->data) {
mail_part = button->data;
- e_mail_part_update_validity (mail_part, valid,
+ e_mail_part_update_validity (
+ mail_part, valid,
E_MAIL_PART_VALIDITY_ENCRYPTED |
E_MAIL_PART_VALIDITY_PGP);
}