[evolution-data-server] camel-gpg-context: Add some debug prints
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] camel-gpg-context: Add some debug prints
- Date: Mon, 15 Feb 2021 16:56:44 +0000 (UTC)
commit 5740819e50eb6cacb28e4db351916652ca81a3ae
Author: Milan Crha <mcrha redhat com>
Date: Mon Feb 15 17:54:12 2021 +0100
camel-gpg-context: Add some debug prints
Let any CAMEL_DEBUG=gpg print the command line being used to execute gpg.
Use CAMEL_DEBUG=gpg:data to left temporary recipient files stored
in the /tmp/ directory. It's those received from an address book.
src/camel/camel-gpg-context.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/src/camel/camel-gpg-context.c b/src/camel/camel-gpg-context.c
index 5e2528bdf..1f6a2f2f4 100644
--- a/src/camel/camel-gpg-context.c
+++ b/src/camel/camel-gpg-context.c
@@ -499,8 +499,10 @@ gpg_ctx_free (struct _GpgCtx *gpg)
if (gpg->recipient_key_files) {
GSList *link;
- for (link = gpg->recipient_key_files; link; link = g_slist_next (link)) {
- g_unlink (link->data);
+ if (!camel_debug ("gpg:data")) {
+ for (link = gpg->recipient_key_files; link; link = g_slist_next (link)) {
+ g_unlink (link->data);
+ }
}
g_slist_free_full (gpg->recipient_key_files, g_free);
@@ -817,6 +819,20 @@ gpg_ctx_op_start (struct _GpgCtx *gpg,
argv = gpg_ctx_get_argv (gpg, fds[7], &status_fd, fds[8], &passwd_fd);
+ if (camel_debug_start ("gpg")) {
+ guint ii;
+
+ printf ("[GPG] going to execute:");
+ for (ii = 0; ii < argv->len; ii++) {
+ if (!argv->pdata[ii])
+ break;
+
+ printf (" %s", (const gchar *) argv->pdata[ii]);
+ }
+ printf ("\n");
+ camel_debug_end ();
+ }
+
if (!(gpg->pid = fork ())) {
/* child process */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]