summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa/ipa_dyndns.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-03-27 18:00:18 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-03-29 15:06:53 -0400
commitbd0dad92d8cd37f9c710741a33820368d9a831c5 (patch)
tree1122068e6452c7fe0162477435982909896c00dd /src/providers/ipa/ipa_dyndns.c
parent65d27fde2412d5c39ed80f3d1b75b5a59e2fb1c8 (diff)
downloadsssd_unused-bd0dad92d8cd37f9c710741a33820368d9a831c5.tar.gz
sssd_unused-bd0dad92d8cd37f9c710741a33820368d9a831c5.tar.xz
sssd_unused-bd0dad92d8cd37f9c710741a33820368d9a831c5.zip
Return correct resolv_status on resolver timeout
https://fedorahosted.org/sssd/ticket/1274
Diffstat (limited to 'src/providers/ipa/ipa_dyndns.c')
-rw-r--r--src/providers/ipa/ipa_dyndns.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/providers/ipa/ipa_dyndns.c b/src/providers/ipa/ipa_dyndns.c
index f4c1a529..4c22274e 100644
--- a/src/providers/ipa/ipa_dyndns.c
+++ b/src/providers/ipa/ipa_dyndns.c
@@ -639,8 +639,9 @@ ipa_dyndns_update_get_addrs_done(struct tevent_req *subreq)
struct ipa_dyndns_update_get_addrs_state);
struct resolv_hostent *rhostent;
int i;
+ int resolv_status;
- ret = resolv_gethostbyname_recv(subreq, state, NULL, NULL,
+ ret = resolv_gethostbyname_recv(subreq, state, &resolv_status, NULL,
&rhostent);
talloc_zfree(subreq);
@@ -666,6 +667,10 @@ ipa_dyndns_update_get_addrs_done(struct tevent_req *subreq)
tevent_req_done(req);
return;
} else if (ret != EOK) {
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("Could not resolve address for this machine, error [%d]: %s, "
+ "resolver returned: [%d]: %s\n", ret, strerror(ret),
+ resolv_status, resolv_strerror(resolv_status)));
tevent_req_error(req, ret);
return;
}