summaryrefslogtreecommitdiffstats
path: root/src/providers/fail_over.h
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2012-08-13 16:37:13 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-08-15 13:51:22 +0200
commit9ab243b369ba317cc964080786dbcdebaf23d6be (patch)
tree7a08b9d00a11e2946a00bcee9b8fc093ee10b19f /src/providers/fail_over.h
parent4f76afc76610a26da85438e5657a6cb5e83c787a (diff)
downloadsssd-9ab243b369ba317cc964080786dbcdebaf23d6be.tar.gz
sssd-9ab243b369ba317cc964080786dbcdebaf23d6be.tar.xz
sssd-9ab243b369ba317cc964080786dbcdebaf23d6be.zip
Duplicate detection in fail over did not work.
https://fedorahosted.org/sssd/ticket/1472
Diffstat (limited to 'src/providers/fail_over.h')
-rw-r--r--src/providers/fail_over.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/providers/fail_over.h b/src/providers/fail_over.h
index b69e8a532..36437ed56 100644
--- a/src/providers/fail_over.h
+++ b/src/providers/fail_over.h
@@ -89,13 +89,20 @@ struct fo_options {
struct fo_ctx *fo_context_init(TALLOC_CTX *mem_ctx,
struct fo_options *opts);
+typedef int (*datacmp_fn)(void*, void*);
+
/*
* Create a new service structure for 'ctx', saving it to the location pointed
* to by '_service'. The needed memory will be allocated from 'ctx'.
* Service name will be set to 'name'.
+ *
+ * Function pointed by user_data_cmp returns 0 if user_data is equal
+ * or nonzero value if not. Set to NULL if no user data comparison
+ * is needed in fail over duplicate servers detection.
*/
int fo_new_service(struct fo_ctx *ctx,
const char *name,
+ datacmp_fn user_data_cmp,
struct fo_service **_service);
/*