dirmngr: Fix error handling.
authorJustus Winter <justus@g10code.com>
Tue, 21 Mar 2017 13:22:13 +0000 (14:22 +0100)
committerJustus Winter <justus@g10code.com>
Tue, 21 Mar 2017 13:22:13 +0000 (14:22 +0100)
* dirmngr/dns-stuff.c (libdns_init): Convert error before printing it.

Signed-off-by: Justus Winter <justus@g10code.com>
dirmngr/dns-stuff.c

index 78c70e1..1a80913 100644 (file)
@@ -568,8 +568,8 @@ libdns_init (void)
               : dns_hints_local (ld.resolv_conf, &derr));
   if (!ld.hints)
     {
               : dns_hints_local (ld.resolv_conf, &derr));
   if (!ld.hints)
     {
-      log_error ("failed to load DNS hints: %s\n", gpg_strerror (err));
       err = libdns_error_to_gpg_error (derr);
       err = libdns_error_to_gpg_error (derr);
+      log_error ("failed to load DNS hints: %s\n", gpg_strerror (err));
       goto leave;
     }
 
       goto leave;
     }