From 8eb2a35e3b180e76da4be5beab11cdb4038860b2 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Fri, 14 May 2010 10:57:19 +0200 Subject: Add offline callbacks --- src/providers/dp_backend.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/providers/dp_backend.h') diff --git a/src/providers/dp_backend.h b/src/providers/dp_backend.h index 43d79ba2c..fc5e558c1 100644 --- a/src/providers/dp_backend.h +++ b/src/providers/dp_backend.h @@ -95,10 +95,11 @@ struct be_ctx { struct be_failover_ctx *be_fo; /* Functions to be invoked when the - * backend goes online + * backend goes online or offline */ struct be_cb *online_cb_list; bool run_online_cb; + struct be_cb *offline_cb_list; struct be_offline_status offstat; @@ -148,6 +149,13 @@ int be_add_online_cb(TALLOC_CTX *mem_ctx, struct be_cb **online_cb); void be_run_online_cb(struct be_ctx *be); +int be_add_offline_cb(TALLOC_CTX *mem_ctx, + struct be_ctx *ctx, + be_callback_t cb, + void *pvt, + struct be_cb **online_cb); +void be_run_offline_cb(struct be_ctx *be); + /* from data_provider_fo.c */ typedef void (be_svc_callback_fn_t)(void *, struct fo_server *); -- cgit