* dirmngr/dns-stuff.c (enable_recursive_resolver, set_dns_nameserver)
(reload_dns_stuff): Conditionalize with USE_LIBDNS.
(get_h_errno_as_gpg_error): Map HOST_NOT_FOUND to GPG_ERR_NO_NAME.
--
get_dns_srv assumes error code of GPG_ERR_NO_NAME when no SRV record
available.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
GnuPG-bug-id: 2889
(cherry picked from commit
d26c51825e2255fe58305cbc1cd74fa43f80d93e)
Gbp-Pq: Name 0013-dirmngr-Fix-for-disable-libdns-usage.patch
enable_recursive_resolver (int yes)
{
recursive_resolver = yes;
enable_recursive_resolver (int yes)
{
recursive_resolver = yes;
libdns_reinit_pending = 1;
libdns_reinit_pending = 1;
strncpy (tor_nameserver, ipaddr? ipaddr : DEFAULT_NAMESERVER,
sizeof tor_nameserver -1);
tor_nameserver[sizeof tor_nameserver -1] = 0;
strncpy (tor_nameserver, ipaddr? ipaddr : DEFAULT_NAMESERVER,
sizeof tor_nameserver -1);
tor_nameserver[sizeof tor_nameserver -1] = 0;
libdns_reinit_pending = 1;
libdns_tor_port = 0; /* Start again with the default port. */
libdns_reinit_pending = 1;
libdns_tor_port = 0; /* Start again with the default port. */
- case HOST_NOT_FOUND: ec = GPG_ERR_UNKNOWN_HOST; break;
+ case HOST_NOT_FOUND: ec = GPG_ERR_NO_NAME; break;
case TRY_AGAIN: ec = GPG_ERR_TRY_LATER; break;
case NO_RECOVERY: ec = GPG_ERR_SERVER_FAILED; break;
case NO_DATA: ec = GPG_ERR_NO_DATA; break;
case TRY_AGAIN: ec = GPG_ERR_TRY_LATER; break;
case NO_RECOVERY: ec = GPG_ERR_SERVER_FAILED; break;
case NO_DATA: ec = GPG_ERR_NO_DATA; break;
void
reload_dns_stuff (int force)
{
void
reload_dns_stuff (int force)
{
libdns_reinit_pending = 0;
}
else
libdns_reinit_pending = 1;
libdns_reinit_pending = 0;
}
else
libdns_reinit_pending = 1;
+#else
+ (void)force;
+#endif