diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-08-14 13:54:12 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-08-15 13:51:46 +0200 |
commit | 058a3f229f00053bfcb25486e25e39cd618ccbef (patch) | |
tree | fe088b7a9630dfcd35256628591231cd165a51c7 /src/providers | |
parent | 34a158bbda215b1ceec833359dd5b889c9abfb4b (diff) | |
download | sssd-058a3f229f00053bfcb25486e25e39cd618ccbef.tar.gz sssd-058a3f229f00053bfcb25486e25e39cd618ccbef.tar.bz2 sssd-058a3f229f00053bfcb25486e25e39cd618ccbef.zip |
FO: Return EAGAIN if there are more servers to try
The caller should issue a next request, which would just shortcut with
ENOENT.
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/fail_over.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c index d6beeb60..422cd675 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); |