[git] GPA - branch, master, updated. gpa-0.9.4-11-g45eb36a

by Werner Koch cvs at cvs.gnupg.org
Mon Aug 19 21:03:45 CEST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Assistant".

The branch, master has been updated
       via  45eb36a00e0bb39fd02cb065e79cbc53945e7103 (commit)
      from  d3f20e7883f2fb9e52e487fd516bdc7b9bc695ed (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 45eb36a00e0bb39fd02cb065e79cbc53945e7103
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 19 20:29:25 2013 +0200

    Fix wrong use of GPGME_EVENT_DONE.
    
    * src/gpacontext.c (gpa_context_event_cb): Fix use of TYPE_DATA.  Add
    debug output.
    --
    
    With GPGME commit c8e934b2 (2009-10-26) gpgme_io_event_done_data_t was
    introduced to replace the use of gpg_error_t with GPGME_EVENT_DONE.
    Unfortunately this was not documented.  Maybe at that time the event
    code was considered internal and its use in GPA was not known.  Too
    bad.

diff --git a/src/gpacontext.c b/src/gpacontext.c
index e021d5f..b049f84 100644
--- a/src/gpacontext.c
+++ b/src/gpacontext.c
@@ -405,16 +405,21 @@ static void
 gpa_context_event_cb (void *data, gpgme_event_io_t type, void *type_data)
 {
   GpaContext *context = data;
-  gpg_error_t *err;
-  
+  gpg_error_t err, op_err;
+
   switch (type)
     {
     case GPGME_EVENT_START:
       g_signal_emit (context, signals[START], 0);
       break;
     case GPGME_EVENT_DONE:
-      err = type_data;
-      g_signal_emit (context, signals[DONE], 0, *err);
+      err = ((gpgme_io_event_done_data_t)type_data)->err;
+      op_err = ((gpgme_io_event_done_data_t)type_data)->op_err;
+      g_debug ("EVENT_DONE: err=%s op_err=%s",
+               gpg_strerror (err), gpg_strerror (op_err));
+      if (!err)
+        err = op_err;
+      g_signal_emit (context, signals[DONE], 0, err);
       break;
     case GPGME_EVENT_NEXT_KEY:
       g_signal_emit (context, signals[NEXT_KEY], 0, type_data);

-----------------------------------------------------------------------

Summary of changes:
 src/gpacontext.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Assistant
http://git.gnupg.org




More information about the Gnupg-commits mailing list