From 77bceb2902dd489443073d91836ea54376c60bf6 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 22 Jan 2016 12:34:50 +0100 Subject: [PATCH] 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 --- dirmngr/ks-engine-hkp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c index 598e614e3..eca02f001 100644 --- a/dirmngr/ks-engine-hkp.c +++ b/dirmngr/ks-engine-hkp.c @@ -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 (); }