[evolution-data-server] Bug #350007 - evolution busy-waits on GPG signing operations



commit c97799e20bbb44953eebf6f5b819197e4ab98099
Author: Milan Crha <mcrha redhat com>
Date:   Mon Aug 31 12:44:12 2009 +0200

    Bug #350007 - evolution busy-waits on GPG signing operations
    
    Reverted previous patch and incorporated different approach, not
    disabling the gpg agent at all.

 camel/camel-gpg-context.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index bfd508d..ccdcf5d 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -498,7 +498,6 @@ gpg_ctx_get_argv (struct _GpgCtx *gpg, gint status_fd, gchar **sfd, gint passwd_
 	g_ptr_array_add (argv, (guint8 *) "--no-secmem-warning");
 	g_ptr_array_add (argv, (guint8 *) "--no-greeting");
 	g_ptr_array_add (argv, (guint8 *) "--no-tty");
-	g_ptr_array_add (argv, (guint8 *) "--no-use-agent");
 
 	if (passwd_fd == -1) {
 		/* only use batch mode if we don't intend on using the
@@ -1199,6 +1198,13 @@ gpg_ctx_op_step (struct _GpgCtx *gpg, CamelException *ex)
 		}
 	}
 
+	if (gpg->need_id) {
+		/* do not ask more than ten times per second when looking for a pass phrase,
+		   in case user has the use-agent set, it'll not use the all CPU when
+		   agent is asking for a pass phrase, instead of us */
+		g_usleep (G_USEC_PER_SEC / 10);
+	}
+
 	return 0;
 
  exception:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]