summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-08-14 13:54:12 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-10-15 15:34:53 +0200
commitf45e0a3c42e49d155dfd7557613843355e638453 (patch)
tree90d0ebef0f72b4e6dca82e3b50af7c91485dbfb0
parentdc29b82a611a7ff0f768d5ff56a715c86bfe6dff (diff)
downloadsssd-f45e0a3c42e49d155dfd7557613843355e638453.tar.gz
sssd-f45e0a3c42e49d155dfd7557613843355e638453.tar.xz
sssd-f45e0a3c42e49d155dfd7557613843355e638453.zip
FO: Return EAGAIN if there are more servers to try
The caller should issue a next request, which would just shortcut with ENOENT.
-rw-r--r--src/providers/fail_over.c9
1 files changed, 9 insertions, 0 deletions
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);