mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01:00
dirmngr: Fix the pool keyserver case for a single host in the pool.
* dirmngr/ks-engine-hkp.c (map_host): Set R_HOSTNAME also for localhost and if there is no pool.
This commit is contained in:
parent
e4f3b74c91
commit
72e04b03b1
@ -476,7 +476,20 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect,
|
|||||||
if (!name || !*name)
|
if (!name || !*name)
|
||||||
{
|
{
|
||||||
*r_host = xtrystrdup ("localhost");
|
*r_host = xtrystrdup ("localhost");
|
||||||
return *r_host? 0 : gpg_error_from_syserror ();
|
if (!*r_host)
|
||||||
|
return gpg_error_from_syserror ();
|
||||||
|
if (r_httphost)
|
||||||
|
{
|
||||||
|
*r_httphost = xtrystrdup (*r_host);
|
||||||
|
if (!*r_httphost)
|
||||||
|
{
|
||||||
|
err = gpg_error_from_syserror ();
|
||||||
|
xfree (*r_host);
|
||||||
|
*r_host = NULL;
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See whether the host is in our table. */
|
/* See whether the host is in our table. */
|
||||||
@ -648,6 +661,12 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect,
|
|||||||
}
|
}
|
||||||
free_dns_addrinfo (aibuf);
|
free_dns_addrinfo (aibuf);
|
||||||
}
|
}
|
||||||
|
else if (r_httphost)
|
||||||
|
{
|
||||||
|
*r_httphost = xtrystrdup (hi->name);
|
||||||
|
if (!*r_httphost)
|
||||||
|
return gpg_error_from_syserror ();
|
||||||
|
}
|
||||||
|
|
||||||
if (hi->dead)
|
if (hi->dead)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user