[Pkg-gnupg-commit] [gnupg2] 179/292: dirmngr: ADNS error handling fix.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Mon Nov 21 06:31:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 45dfc02b47f798f5a3b9973ca6a9f5a907d7e665
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Thu Oct 27 16:22:26 2016 +0900
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 <gniibe at fsij.org>
---
dirmngr/dns-stuff.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index 28a500c..4bd3a87 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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list