dirmngr: Provide the keyserver pool name even if there is no CNAME.

* dirmngr/ks-engine-hkp.c (map_host): Fix setting of r_poolname.
--

map_host is intended to return the name of the pool as an additional
information.  However this broke some time ago and a pool name was
only retrained if the pool name was retrieved from a DNS CNAME.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-01-22 12:34:50 +01:00
parent afb8696126
commit 77bceb2902
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 2 additions and 2 deletions

View File

@ -545,9 +545,9 @@ map_host (ctrl_t ctrl, const char *name, int force_reselect,
if (hi->pool)
{
/* Deal with the pool name before selecting a host. */
if (r_poolname && hi->cname)
if (r_poolname)
{
*r_poolname = xtrystrdup (hi->cname);
*r_poolname = xtrystrdup (hi->cname? hi->cname : hi->name);
if (!*r_poolname)
return gpg_error_from_syserror ();
}