From f45e0a3c42e49d155dfd7557613843355e638453 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 14 Aug 2012 13:54:12 +0200 Subject: FO: Return EAGAIN if there are more servers to try The caller should issue a next request, which would just shortcut with ENOENT. --- src/providers/fail_over.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c index 4b2841834..6ca84ac93 100644 --- a/src/providers/fail_over.c +++ b/src/providers/fail_over.c @@ -943,6 +943,15 @@ fo_resolve_service_done(struct tevent_req *subreq) DEBUG(1, ("Failed to resolve server '%s': %s\n", common->name, resolv_strerror(resolv_status))); + /* If the resolver failed to resolve a hostname but did not + * encounter an error, tell the caller to retry another server. + * + * If there are no more servers to try, the next request would + * just shortcut with ENOENT. + */ + if (ret == ENOENT) { + ret = EAGAIN; + } set_server_common_status(common, SERVER_NOT_WORKING); } else { set_server_common_status(common, SERVER_NAME_RESOLVED); -- cgit