diff options
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/camel-pgp-context.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 834ec96fe7..f14aa2bb3d 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2001-09-13 Jeffrey Stedfast <fejj@ximian.com> + + * camel-pgp-context.c (crypto_exec_with_passwd): Return -1 on + failure. + 2001-09-12 Larry Ewing <lewing@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_mbox): free diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c index ebd8d4027a..13a94b449f 100644 --- a/camel/camel-pgp-context.c +++ b/camel/camel-pgp-context.c @@ -296,7 +296,7 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int *diagnostics = g_strdup_printf ("Couldn't create pipe to %s: " "%s", path, g_strerror (errno)); - return 0; + return -1; } if (!(child = fork ())) { @@ -326,7 +326,7 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int } else if (child < 0) { *diagnostics = g_strdup_printf ("Cannot fork %s: %s", argv[0], g_strerror (errno)); - return 0; + return -1; } /* Parent */ @@ -1329,7 +1329,7 @@ pgp_decrypt (CamelCipherContext *ctx, CamelStream *istream, g_free (passphrase); /* gpg returns '1' if it succeedes in decrypting but can't verify the signature */ - if (!(retval == 0 || (context->priv->type == CAMEL_PGP_TYPE_GPG && retval == 1)) || !*plaintext) { + if (retval != 0 || (context->priv->type == CAMEL_PGP_TYPE_GPG && retval == 1) || !*plaintext) { camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, "%s", diagnostics); g_free (plaintext); |