[evolution-data-server/gnome-2-30] Bug #418502 - Evolution causes gpg stale locks
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-2-30] Bug #418502 - Evolution causes gpg stale locks
- Date: Thu, 1 Apr 2010 12:09:48 +0000 (UTC)
commit 757a25d77a66920effd28109804507d02dc2ad9e
Author: Milan Crha <mcrha redhat com>
Date: Thu Apr 1 14:09:22 2010 +0200
Bug #418502 - Evolution causes gpg stale locks
camel/camel-gpg-context.c | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index 51308b5..e6e69f9 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -1389,8 +1389,10 @@ gpg_sign (CamelCipherContext *context, const gchar *userid, CamelCipherHash hash
}
while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, ex) == -1)
+ if (gpg_ctx_op_step (gpg, ex) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto fail;
+ }
}
if (gpg_ctx_op_wait (gpg) != 0) {
@@ -1632,8 +1634,10 @@ gpg_verify (CamelCipherContext *context, CamelMimePart *ipart, CamelException *e
}
while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, ex) == -1)
+ if (gpg_ctx_op_step (gpg, ex) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto exception;
+ }
}
/* report error only when no data or didn't found signature */
@@ -1731,8 +1735,10 @@ gpg_encrypt (CamelCipherContext *context, const gchar *userid, GPtrArray *recipi
/* FIXME: move this to a common routine */
while (!gpg_ctx_op_complete(gpg)) {
- if (gpg_ctx_op_step (gpg, ex) == -1)
+ if (gpg_ctx_op_step (gpg, ex) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto fail;
+ }
}
if (gpg_ctx_op_wait (gpg) != 0) {
@@ -1861,8 +1867,10 @@ gpg_decrypt(CamelCipherContext *context, CamelMimePart *ipart, CamelMimePart *op
}
while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, ex) == -1)
+ if (gpg_ctx_op_step (gpg, ex) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto fail;
+ }
}
if (gpg_ctx_op_wait (gpg) != 0) {
@@ -1956,8 +1964,10 @@ gpg_import_keys (CamelCipherContext *context, CamelStream *istream, CamelExcepti
}
while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, ex) == -1)
+ if (gpg_ctx_op_step (gpg, ex) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto fail;
+ }
}
if (gpg_ctx_op_wait (gpg) != 0) {
@@ -2001,8 +2011,10 @@ gpg_export_keys (CamelCipherContext *context, GPtrArray *keys, CamelStream *ostr
}
while (!gpg_ctx_op_complete (gpg)) {
- if (gpg_ctx_op_step (gpg, ex) == -1)
+ if (gpg_ctx_op_step (gpg, ex) == -1) {
+ gpg_ctx_op_cancel (gpg);
goto fail;
+ }
}
if (gpg_ctx_op_wait (gpg) != 0) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]