[git] GnuPG - branch, npth, updated. post-nuke-of-trailing-ws-117-g0e5d57c

by Marcus Brinkmann cvs at cvs.gnupg.org
Thu Oct 13 18:36:58 CEST 2011


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 Guard".

The branch, npth has been updated
       via  0e5d57cc6d839b90d642308085e4800a67f89250 (commit)
       via  7629ac332c9c31503d6786f7aee7937337de7b1f (commit)
      from  63dd3b9a43ec3ea7be2362e3e77e5a5ce68fc805 (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 0e5d57cc6d839b90d642308085e4800a67f89250
Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Date:   Thu Oct 13 17:50:10 2011 +0200

    Cast npth_self result for safety.

diff --git a/agent/ChangeLog b/agent/ChangeLog
index c18e9e5..721abac 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,5 +1,9 @@
 2011-10-13  Marcus Brinkmann  <marcus at g10code.com>
 
+	* gpg-agent.c (start_connection_thread)
+	(start_connection_thread_ssh): Cast npth_self result to unsigned
+	long for safety.
+
 	* cache.c (new_data): Fix error check.
 
 	* cache.c, call-pinentry.c, call-scd.c, findkey.c, gpg-agent.c,
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index abd2441..30ec1d3 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -1778,19 +1778,19 @@ start_connection_thread (void *arg)
 
   if (check_nonce (ctrl, &socket_nonce))
     {
-      log_error ("handler 0x%lx nonce check FAILED\n", npth_self());
+      log_error ("handler 0x%lx nonce check FAILED\n", (unsigned long) npth_self());
       return NULL;
     }
 
   agent_init_default_ctrl (ctrl);
   if (opt.verbose)
     log_info (_("handler 0x%lx for fd %d started\n"),
-              npth_self(), FD2INT(ctrl->thread_startup.fd));
+              (unsigned long) npth_self(), FD2INT(ctrl->thread_startup.fd));
 
   start_command_handler (ctrl, GNUPG_INVALID_FD, ctrl->thread_startup.fd);
   if (opt.verbose)
     log_info (_("handler 0x%lx for fd %d terminated\n"),
-              npth_self(), FD2INT(ctrl->thread_startup.fd));
+              (unsigned long) npth_self(), FD2INT(ctrl->thread_startup.fd));
 
   agent_deinit_default_ctrl (ctrl);
   xfree (ctrl);
@@ -1810,12 +1810,12 @@ start_connection_thread_ssh (void *arg)
   agent_init_default_ctrl (ctrl);
   if (opt.verbose)
     log_info (_("ssh handler 0x%lx for fd %d started\n"),
-              npth_self(), FD2INT(ctrl->thread_startup.fd));
+              (unsigned long) npth_self(), FD2INT(ctrl->thread_startup.fd));
 
   start_command_handler_ssh (ctrl, ctrl->thread_startup.fd);
   if (opt.verbose)
     log_info (_("ssh handler 0x%lx for fd %d terminated\n"),
-              npth_self(), FD2INT(ctrl->thread_startup.fd));
+              (unsigned long) npth_self(), FD2INT(ctrl->thread_startup.fd));
 
   agent_deinit_default_ctrl (ctrl);
   xfree (ctrl);

commit 7629ac332c9c31503d6786f7aee7937337de7b1f
Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Date:   Thu Oct 13 17:49:45 2011 +0200

    Fix error check.

diff --git a/agent/ChangeLog b/agent/ChangeLog
index ba27270..c18e9e5 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,5 +1,7 @@
 2011-10-13  Marcus Brinkmann  <marcus at g10code.com>
 
+	* cache.c (new_data): Fix error check.
+
 	* cache.c, call-pinentry.c, call-scd.c, findkey.c, gpg-agent.c,
 	trustlist.c: Port to NPth.
 
diff --git a/agent/cache.c b/agent/cache.c
index 712da0c..1c8a42b 100644
--- a/agent/cache.c
+++ b/agent/cache.c
@@ -185,7 +185,7 @@ new_data (const char *string, struct secret_data_s **r_data)
   d_enc->totallen = total;
   res = npth_mutex_lock (&encryption_lock);
   if (res)
-    log_fatal ("failed to acquire cache encryption mutex: %s\n", strerror (err));
+    log_fatal ("failed to acquire cache encryption mutex: %s\n", strerror (res));
   err = gcry_cipher_encrypt (encryption_handle, d_enc->data, total,
                              d->data, total - 8);
   xfree (d);

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

Summary of changes:
 agent/ChangeLog   |    6 ++++++
 agent/cache.c     |    2 +-
 agent/gpg-agent.c |   10 +++++-----
 3 files changed, 12 insertions(+), 6 deletions(-)


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




More information about the Gnupg-commits mailing list