aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/http.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-12-20 08:53:58 +0000
committerWerner Koch <[email protected]>2016-12-20 08:53:58 +0000
commit81c012787fabf734d9c952c6f18ecac21929d4d8 (patch)
treea69f7064a65d66c5f623eb11d272f173e4f8f08f /dirmngr/http.c
parentdirmngr: Fix problems with the getsrv function. (diff)
downloadgnupg-81c012787fabf734d9c952c6f18ecac21929d4d8.tar.gz
gnupg-81c012787fabf734d9c952c6f18ecac21929d4d8.zip
dirmngr: New option --resolver-timeout.
* dirmngr/dns-stuff.c (DEFAULT_TIMEOUT): New. (opt_timeout): New var. (set_dns_timeout): New. (libdns_res_open): Set the default timeout. (libdns_res_wait): Use configurable timeout. (resolve_name_libdns): Ditto. * dirmngr/dirmngr.c (oResolverTimeout): New const. (opts): New option --resolver-timeout. (parse_rereadable_options): Set that option. (main) <aGPGConfList>: Add --nameserver and --resolver-timeout. * tools/gpgconf-comp.c (gc_options_dirmngr): Add --resolver-timeout and --nameserver. * dirmngr/http.c (connect_server): Fix yesterday introduced bug in error diagnostic. -- This timeout is a pretty crude thing because libdns has a few other internal timeouts as well. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--dirmngr/http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dirmngr/http.c b/dirmngr/http.c
index 619f2f1b4..14d60df4b 100644
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -2378,10 +2378,10 @@ connect_server (const char *server, unsigned short port,
stpcpy (stpcpy (stpcpy (stpcpy (srvname,"_"), srvtag),
"._tcp."), server);
err = get_dns_srv (srvname, &serverlist, &srvcount);
- xfree (srvname);
if (err)
log_info ("getting SRV '%s' failed: %s\n",
- serverlist[srv].target, gpg_strerror (err));
+ srvname, gpg_strerror (err));
+ xfree (srvname);
/* Note that on error SRVCOUNT is zero. */
}
}