aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2016-10-27 07:22:26 +0000
committerNIIBE Yutaka <[email protected]>2016-10-27 07:22:26 +0000
commit45dfc02b47f798f5a3b9973ca6a9f5a907d7e665 (patch)
treee5501291cf711a5d038727010e5c927f8d5ac547
parentgpg: Convey --quick option to dirmngr for --auto-key-retrieve. (diff)
downloadgnupg-45dfc02b47f798f5a3b9973ca6a9f5a907d7e665.tar.gz
gnupg-45dfc02b47f798f5a3b9973ca6a9f5a907d7e665.zip
dirmngr: ADNS error handling fix.
* dirmngr/dns-stuff.c (resolve_name_adns, get_dns_cert, get_dns_cname): Use gpg_error and gpg_err_code_from_errno to compose the error value. -- This fixes commits 6f1d8123d61b3efac94b4c61ee75bd947790ba42. Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r--dirmngr/dns-stuff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index 28a500cd9..4bd3a8793 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -278,7 +278,7 @@ resolve_name_adns (const char *name, unsigned short port,
my_protect ();
if (ret)
{
- err = ret;
+ err = gpg_error (gpg_err_code_from_errno (ret));
log_error ("DNS query failed: %s\n", gpg_strerror (err));
goto leave;
}
@@ -682,8 +682,8 @@ get_dns_cert (const char *name, int want_certtype,
my_protect ();
if (ret)
{
- err = ret;
- /* log_error ("DNS query failed: %s\n", strerror (err)); */
+ err = gpg_error (gpg_err_code_from_errno (ret));
+ /* log_error ("DNS query failed: %s\n", gpg_strerror (err)); */
adns_finish (state);
return err;
}
@@ -1281,7 +1281,7 @@ get_dns_cname (const char *name, char **r_cname)
my_protect ();
if (rc)
{
- err = rc;
+ err = gpg_error (gpg_err_code_from_errno (rc));
log_error ("DNS query failed: %s\n", gpg_strerror (err));
adns_finish (state);
return err;