From: Jeffrey Stedfast Date: Thu, 5 Jul 2001 20:37:30 +0000 (+0000) Subject: Send the --no-auto-key-retrieve argument to gpg if we are in offline mode X-Git-Tag: upstream/3.7.4~10833 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5f31b7244c51f948d06f251a427a5c2cf6762cf;p=platform%2Fupstream%2Fevolution-data-server.git Send the --no-auto-key-retrieve argument to gpg if we are in offline mode 2001-07-05 Jeffrey Stedfast * camel-pgp-context.c (pgp_verify): Send the --no-auto-key-retrieve argument to gpg if we are in offline mode so that we don't have to worry about gpg hanging if it can't connect to the key servers, because now it shouldn't even attempt to. --- diff --git a/camel/ChangeLog b/camel/ChangeLog index e1ef7e6..16b424e 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,9 +1,10 @@ 2001-07-05 Jeffrey Stedfast * camel-pgp-context.c (pgp_verify): Send the - --no-auto-key-retrieve argument to gpg so that we don't have to - worry about gpg hanging if it can't connect to the key servers, - because now it shouldn't even attempt to. + --no-auto-key-retrieve argument to gpg if we are in offline mode + so that we don't have to worry about gpg hanging if it can't + connect to the key servers, because now it shouldn't even attempt + to. 2001-07-05 Chris Toshok diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c index 6651b0b..881cc0c 100644 --- a/camel/camel-pgp-context.c +++ b/camel/camel-pgp-context.c @@ -388,7 +388,7 @@ crypto_exec_with_passwd (const char *path, char *argv[], const char *input, int if (size + 4096 > alloc_size) { alloc_size += 4096; - buf = g_realloc (buf , alloc_size); + buf = g_realloc (buf, alloc_size); } read_len = read (op_fds[0], &buf[size], alloc_size - size - 1); @@ -901,7 +901,9 @@ pgp_verify (CamelCipherContext *ctx, CamelCipherHash hash, CamelStream *istream, argv[i++] = "--verify"; argv[i++] = "--no-tty"; - argv[i++] = "--no-auto-key-retrieve"; + + if (!camel_session_is_online (ctx->session)) + argv[i++] = "--no-auto-key-retrieve"; /*argv[i++] = "--verbose";*/ /*argv[i++] = "--yes";*/ /*argv[i++] = "--batch";*/