summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-10-28 01:43:08 +0000
committerJeffrey Stedfast <fejj@src.gnome.org>2002-10-28 01:43:08 +0000
commit699339a382f3a5454a38db5011285ff6c29fdde8 (patch)
tree6bb67f4a13c52e8e6483bacd9455db6b60afe59d
parent463dd7219021d64cc365805aee15525586283910 (diff)
downloadevolution-data-server-evolution-1-2-recurid-branch.tar.gz
Don't prematurely set gpg->complete to TRUE. Let gpg_ctx_op_step () set itEVOLUTION_1_2_0EVOLUTION_1_1_90evolution-1-2-recurid-branch
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.
-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 5c7fe6557..bf9874061 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 26ad0f81b..8d948d038 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: