aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-09-14 00:16:39 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-09-14 00:16:39 +0800
commit6095ecfc4bb1b0c1ffe1cf5beebaf9ca7507f25d (patch)
treea28c0eb295732d6e326d0c1c960641e62d3c57c1 /camel
parent00368d2905d4bd8da5dbf82f93e41043eeb349ff (diff)
downloadgsoc2013-evolution-6095ecfc4bb1b0c1ffe1cf5beebaf9ca7507f25d.tar
gsoc2013-evolution-6095ecfc4bb1b0c1ffe1cf5beebaf9ca7507f25d.tar.gz
gsoc2013-evolution-6095ecfc4bb1b0c1ffe1cf5beebaf9ca7507f25d.tar.bz2
gsoc2013-evolution-6095ecfc4bb1b0c1ffe1cf5beebaf9ca7507f25d.tar.lz
gsoc2013-evolution-6095ecfc4bb1b0c1ffe1cf5beebaf9ca7507f25d.tar.xz
gsoc2013-evolution-6095ecfc4bb1b0c1ffe1cf5beebaf9ca7507f25d.tar.zst
gsoc2013-evolution-6095ecfc4bb1b0c1ffe1cf5beebaf9ca7507f25d.zip
Return -1 on failure.
2001-09-13 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (crypto_exec_with_passwd): Return -1 on failure. svn path=/trunk/; revision=12799
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-pgp-context.c6
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);