[Pkg-gnupg-commit] [gnupg2] 64/116: dirmngr: After a connection failure log a hint if Tor is not running.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Jan 24 04:40:54 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit 20dfcfe08c618d23134d5d6efef7676b090f30d3
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Jan 11 17:09:16 2017 +0100

    dirmngr: After a connection failure log a hint if Tor is not running.
    
    * dirmngr/ks-engine-hkp.c (handle_send_request_error): Check whether
    Tor is running.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 dirmngr/ks-engine-hkp.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c
index ddeba45..5febb13 100644
--- a/dirmngr/ks-engine-hkp.c
+++ b/dirmngr/ks-engine-hkp.c
@@ -1138,6 +1138,17 @@ handle_send_request_error (gpg_error_t err, const char *request,
   switch (gpg_err_code (err))
     {
     case GPG_ERR_ECONNREFUSED:
+      if (opt.use_tor)
+        {
+          assuan_fd_t sock;
+
+          sock = assuan_sock_connect_byname (NULL, 0, 0, NULL, ASSUAN_SOCK_TOR);
+          if (sock == ASSUAN_INVALID_FD)
+            log_info ("(it seems Tor is not running)\n");
+          else
+            assuan_sock_close (sock);
+        }
+      /*FALLTHRU*/
     case GPG_ERR_ENETUNREACH:
     case GPG_ERR_ENETDOWN:
     case GPG_ERR_UNKNOWN_HOST:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list