dirmngr: Improve assuan error comment for cmd keyserver.
authorWerner Koch <wk@gnupg.org>
Sat, 27 Jan 2018 18:46:19 +0000 (19:46 +0100)
committerWerner Koch <wk@gnupg.org>
Sat, 27 Jan 2018 18:46:19 +0000 (19:46 +0100)
* dirmngr/server.c: Add error comment in case --resolve fails in
ensure_keyserver.
--

GnuPG-bug-id: 3756
Signed-off-by: Werner Koch <wk@gnupg.org>
dirmngr/server.c

index 3d0768b..ab2ca85 100644 (file)
@@ -2134,8 +2134,13 @@ cmd_keyserver (assuan_context_t ctx, char *line)
   if (resolve_flag)
     {
       err = ensure_keyserver (ctrl);
-      if (!err)
-        err = ks_action_resolve (ctrl, ctrl->server_local->keyservers);
+      if (err)
+        {
+          assuan_set_error (ctx, err,
+                            "Bad keyserver configuration in dirmngr.conf");
+          goto leave;
+        }
+      err = ks_action_resolve (ctrl, ctrl->server_local->keyservers);
       if (err)
         goto leave;
     }