From 2baa90f92dce1cb5b71c7a0b7b8e2ed93f704e77 Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: Thu, 29 Oct 2009 22:31:59 +0100 Subject: Add fail over utility functions These functions should be used by providers to centrally manage lists of servers. Servers are grouped into services and each service has it's own list of servers. If, however, you will try to add a same server into two different services, they will share a common structure. This means that a host will only be resolved once. --- server/Makefile.am | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'server/Makefile.am') diff --git a/server/Makefile.am b/server/Makefile.am index ca793394c..88053fc59 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -69,7 +69,8 @@ if HAVE_CHECK krb5-utils-tests \ check_and_open-tests \ files-tests \ - refcount-tests + refcount-tests \ + fail_over-tests endif check_PROGRAMS = \ @@ -209,6 +210,9 @@ if BUILD_ARES_PARSE_TXT SSSD_RESOLV_OBJ += resolv/ares/ares_parse_txt_reply.c endif +SSSD_FAILOVER_OBJ = \ + providers/fail_over.c \ + $(SSSD_RESOLV_OBJ) SSSD_LIBS = \ $(TALLOC_LIBS) \ @@ -279,6 +283,7 @@ dist_noinst_HEADERS = \ confdb/confdb_setup.h \ providers/data_provider.h \ providers/dp_backend.h \ + providers/fail_over.h \ providers/providers.h \ providers/krb5/krb5_auth.h \ providers/krb5/krb5_common.h \ @@ -478,6 +483,19 @@ refcount_tests_CFLAGS = \ refcount_tests_LDADD = \ $(SSSD_LIBS) \ $(CHECK_LIBS) + +fail_over_tests_SOURCES = \ + tests/fail_over-tests.c \ + tests/common.c \ + $(SSSD_FAILOVER_OBJ) \ + $(CHECK_OBJ) \ + $(SSSD_UTIL_OBJ) +fail_over_tests_CFLAGS = \ + $(CHECK_CFLAGS) +fail_over_tests_LDADD = \ + $(SSSD_LIBS) \ + $(CHECK_LIBS) \ + $(CARES_LIBS) endif stress_tests_SOURCES = \ -- cgit