From 64f398dca52df6313169f33cfc20a69d51c3bc2b Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 27 Mar 2012 18:00:18 -0400 Subject: Return correct resolv_status on resolver timeout https://fedorahosted.org/sssd/ticket/1274 --- src/providers/ipa/ipa_dyndns.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/providers/ipa') diff --git a/src/providers/ipa/ipa_dyndns.c b/src/providers/ipa/ipa_dyndns.c index 089f8fba..71fc27bc 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; } -- cgit