mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
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@gnupg.org>
This commit is contained in:
parent
76fb2febde
commit
20dfcfe08c
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user