summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2016-01-19 15:04:04 +0100
committerJakub Hrozek <jhrozek@redhat.com>2016-01-19 17:42:20 +0100
commit5a7f17aedad34a8618765bc33342c109a6958ab5 (patch)
tree50723314a6fa9cb7f702773152323e9e21c1f3d7 /src/providers
parent5f7cd30c865046a7ea69944f7e07c85b4c43465a (diff)
downloadsssd-5a7f17aedad34a8618765bc33342c109a6958ab5.tar.gz
sssd-5a7f17aedad34a8618765bc33342c109a6958ab5.tar.xz
sssd-5a7f17aedad34a8618765bc33342c109a6958ab5.zip
FO: add fo_get_active_server()
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/fail_over.c5
-rw-r--r--src/providers/fail_over.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c
index 0b99098ad..e945c9924 100644
--- a/src/providers/fail_over.c
+++ b/src/providers/fail_over.c
@@ -1524,6 +1524,11 @@ fo_set_port_status(struct fo_server *server, enum port_status status)
}
}
+struct fo_server *fo_get_active_server(struct fo_service *service)
+{
+ return service->active_server;
+}
+
void fo_try_next_server(struct fo_service *service)
{
struct fo_server *server;
diff --git a/src/providers/fail_over.h b/src/providers/fail_over.h
index 75bff8da1..f24b5715f 100644
--- a/src/providers/fail_over.h
+++ b/src/providers/fail_over.h
@@ -208,6 +208,8 @@ void fo_reset_services(struct fo_ctx *fo_ctx);
void fo_reset_servers(struct fo_service *svc);
+struct fo_server *fo_get_active_server(struct fo_service *service);
+
bool fo_svc_has_server(struct fo_service *service, struct fo_server *server);
/*