mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
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@fsij.org>
This commit is contained in:
parent
a15ed5a1fd
commit
45dfc02b47
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user