summaryrefslogtreecommitdiffstats
path: root/src/providers/dp_backend.h
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-06-20 13:41:53 -0400
committerJakub Hrozek <jhrozek@redhat.com>2012-08-01 16:19:41 +0200
commit75ee7925a9e289bc24f0ce8a7988cca926b71513 (patch)
tree7518ae48dd0cdce43f7e8639144498ad44070be9 /src/providers/dp_backend.h
parent6c7057667272d6297924a6ccbf68700e791da0a7 (diff)
downloadsssd-75ee7925a9e289bc24f0ce8a7988cca926b71513.tar.gz
sssd-75ee7925a9e289bc24f0ce8a7988cca926b71513.tar.xz
sssd-75ee7925a9e289bc24f0ce8a7988cca926b71513.zip
Primary server support: introduce concept of reconnection
This patch adds two support functions for adding reconnection callbacks and invoking such callbacks. The concept of reconnection is simple: stop using current connection for for new queries to the server without actually going offline.
Diffstat (limited to 'src/providers/dp_backend.h')
-rw-r--r--src/providers/dp_backend.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/providers/dp_backend.h b/src/providers/dp_backend.h
index 6496697dd..41dd3f6d0 100644
--- a/src/providers/dp_backend.h
+++ b/src/providers/dp_backend.h
@@ -107,6 +107,7 @@ struct be_ctx {
struct be_cb *online_cb_list;
bool run_online_cb;
struct be_cb *offline_cb_list;
+ struct be_cb *reconnect_cb_list;
struct be_offline_status offstat;
@@ -186,6 +187,13 @@ struct be_host_req {
bool be_is_offline(struct be_ctx *ctx);
void be_mark_offline(struct be_ctx *ctx);
+int be_add_reconnect_cb(TALLOC_CTX *mem_ctx,
+ struct be_ctx *ctx,
+ be_callback_t cb,
+ void *pvt,
+ struct be_cb **reconnect_cb);
+void be_run_reconnect_cb(struct be_ctx *be);
+
int be_add_online_cb(TALLOC_CTX *mem_ctx,
struct be_ctx *ctx,
be_callback_t cb,