diff options
author | eindenbom <eindenbom@gmail.com> | 2010-07-02 18:46:53 +0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-07-09 11:44:06 -0400 |
commit | 54577e54d1b6300aeb348087372c14ed72530f88 (patch) | |
tree | 47af5ec5db8ab7cd430a17545ac563023f02c919 /src/providers/fail_over.c | |
parent | 2d7a7b0140a4d3fcef9148900276e24f82e33866 (diff) | |
download | sssd-54577e54d1b6300aeb348087372c14ed72530f88.tar.gz sssd-54577e54d1b6300aeb348087372c14ed72530f88.tar.xz sssd-54577e54d1b6300aeb348087372c14ed72530f88.zip |
Add an interface to try next fail-over server after connection to the active server was unexpectedly dropped.
Diffstat (limited to 'src/providers/fail_over.c')
-rw-r--r-- | src/providers/fail_over.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c index f364a8c5f..3dab38a34 100644 --- a/src/providers/fail_over.c +++ b/src/providers/fail_over.c @@ -1275,6 +1275,27 @@ fo_set_port_status(struct fo_server *server, enum port_status status) } } +void fo_try_next_server(struct fo_service *service) +{ + struct fo_server *server; + + if (!service) { + DEBUG(1, ("Bug: No service supplied\n")); + return; + } + + server = service->active_server; + if (!server) { + return; + } + + service->active_server = 0; + + if (server->port_status == PORT_WORKING) { + server->port_status = PORT_NEUTRAL; + } +} + void * fo_get_server_user_data(struct fo_server *server) { |