aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-10-28 09:43:08 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-10-28 09:43:08 +0800
commit8ef877a11e28fb9b4abbad109b237e1f53765275 (patch)
tree619a031ee6a9b616441bb3fdd87c9bf873b136e4
parente5d1afdc538dbb0d298ef6c8352d165384c42930 (diff)
downloadgsoc2013-evolution-8ef877a11e28fb9b4abbad109b237e1f53765275.tar.gz
gsoc2013-evolution-8ef877a11e28fb9b4abbad109b237e1f53765275.tar.zst
gsoc2013-evolution-8ef877a11e28fb9b4abbad109b237e1f53765275.zip
Don't prematurely set gpg->complete to TRUE. Let gpg_ctx_op_step () set it
2002-10-25 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_parse_status): Don't prematurely set gpg->complete to TRUE. Let gpg_ctx_op_step () set it to TRUE when gpg closes the status-fd instead. svn path=/trunk/; revision=18448
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-gpg-context.c13
2 files changed, 10 insertions, 9 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 5c7fe65570..bf98740615 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2002-10-25 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-gpg-context.c (gpg_ctx_parse_status): Don't prematurely
+ set gpg->complete to TRUE. Let gpg_ctx_op_step () set it to TRUE
+ when gpg closes the status-fd instead.
+
2002-10-24 Not Zed <NotZed@Ximian.com>
** For bug #31647 and bug #31456.
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index 26ad0f81b6..8d948d0380 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -791,7 +791,7 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg, CamelException *ex)
switch (gpg->mode) {
case GPG_CTX_MODE_SIGN:
if (!strncmp (status, "SIG_CREATED ", 12)) {
- gpg->complete = TRUE;
+ /* FIXME: save this state? */
}
break;
case GPG_CTX_MODE_VERIFY:
@@ -805,9 +805,7 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg, CamelException *ex)
gpg->trust = GPG_TRUST_FULLY;
} else if (!strncmp (status, "ULTIMATE", 8)) {
gpg->trust = GPG_TRUST_ULTIMATE;
- }
-
- gpg->complete = TRUE;
+ }
/* Since verifying a signature will never produce output
on gpg's stdout descriptor, we use this EOF bit for
@@ -826,7 +824,7 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg, CamelException *ex)
if (!strncmp (status, "BEGIN_ENCRYPTION", 16)) {
/* nothing to do... but we know to expect data on stdout soon */
} else if (!strncmp (status, "END_ENCRYPTION", 14)) {
- gpg->complete = TRUE;
+ /* nothing to do, but we know the end is near? */
} else if (!strncmp (status, "NO_RECP", 7)) {
camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
_("Failed to encrypt: No valid recipients specified."));
@@ -837,13 +835,10 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg, CamelException *ex)
if (!strncmp (status, "BEGIN_DECRYPTION", 16)) {
/* nothing to do... but we know to expect data on stdout soon */
} else if (!strncmp (status, "END_DECRYPTION", 14)) {
- gpg->complete = TRUE;
+ /* nothing to do, but we know the end is near? */
}
break;
}
-
- if (gpg->complete)
- d(printf ("okay, that's all folks...\n"));
}
recycle: