From 058a3f229f00053bfcb25486e25e39cd618ccbef 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(+) (limited to 'src/providers/fail_over.c') diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c index d6beeb60e..422cd675b 100644 --- a/src/providers/fail_over.c +++ b/src/providers/fail_over.c @@ -1006,6 +1006,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