chiark
/
gitweb
/
~ian
/
gnupg2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dirmngr: Make sure Tor mode is also set for DNS on SIGHUP.
[gnupg2.git]
/
dirmngr
/
dns-stuff.c
diff --git
a/dirmngr/dns-stuff.c
b/dirmngr/dns-stuff.c
index cf8cefb2eeaa574ca7905385be04f4fb6a7a25f9..e32e1e3e1bb827d31f9349465bc5e937a9bbba45 100644
(file)
--- a/
dirmngr/dns-stuff.c
+++ b/
dirmngr/dns-stuff.c
@@
-199,9
+199,9
@@
recursive_resolver_p (void)
}
}
-/*
Sets the module in Tor mode. Returns 0 is this is possible or an
-
error code
. */
-gpg_error_t
+/*
Puts this module eternally into Tor mode. When called agained with
+
* NEW_CIRCUIT request a new TOR circuit for the next DNS query
. */
+void
enable_dns_tormode (int new_circuit)
{
if (!*tor_socks_user || new_circuit)
enable_dns_tormode (int new_circuit)
{
if (!*tor_socks_user || new_circuit)
@@
-215,7
+215,6
@@
enable_dns_tormode (int new_circuit)
counter++;
}
tor_mode = 1;
counter++;
}
tor_mode = 1;
- return 0;
}
}
@@
-548,7
+547,10
@@
reload_dns_stuff (int force)
libdns_reinit_pending = 0;
}
else
libdns_reinit_pending = 0;
}
else
- libdns_reinit_pending = 1;
+ {
+ libdns_reinit_pending = 1;
+ libdns_tor_port = 0; /* Start again with the default port. */
+ }
#else
(void)force;
#endif
#else
(void)force;
#endif