diff options
author | Simo Sorce <idra@samba.org> | 2009-01-14 15:52:48 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2009-01-14 15:52:48 -0500 |
commit | f52c3c6a93f673ba422f5eee1788e2f5b70b3a6a (patch) | |
tree | ce9816cc678402cd90d796ffeca6e273de7fd487 /server/providers/dp_helpers.c | |
parent | 2a729edfe36c7519c48b9b4225fc84be6775da08 (diff) | |
download | sssd-f52c3c6a93f673ba422f5eee1788e2f5b70b3a6a.tar.gz sssd-f52c3c6a93f673ba422f5eee1788e2f5b70b3a6a.tar.bz2 sssd-f52c3c6a93f673ba422f5eee1788e2f5b70b3a6a.zip |
Add code to make it easier to reconnect in case the server
is not available immediately or drops the dbus connection.
First step is the nss connection to the data provider.
Diffstat (limited to 'server/providers/dp_helpers.c')
-rw-r--r-- | server/providers/dp_helpers.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/providers/dp_helpers.c b/server/providers/dp_helpers.c index 99d65f45..52dc69e1 100644 --- a/server/providers/dp_helpers.c +++ b/server/providers/dp_helpers.c @@ -25,6 +25,8 @@ int dp_sbus_cli_init(TALLOC_CTX *mem_ctx, struct event_context *ev, struct confdb_ctx *cdb, struct sbus_method *methods, + void *conn_pvt_data, + sbus_conn_destructor_fn destructor, struct service_sbus_ctx **srvs_ctx) { struct service_sbus_ctx *ss_ctx; @@ -87,6 +89,14 @@ int dp_sbus_cli_init(TALLOC_CTX *mem_ctx, sm_ctx->message_handler = sbus_message_handler; sbus_conn_add_method_ctx(ss_ctx->scon_ctx, sm_ctx); + if (conn_pvt_data) { + sbus_conn_set_private_data(ss_ctx->scon_ctx, conn_pvt_data); + } + + if (destructor) { + sbus_conn_set_destructor(ss_ctx->scon_ctx, destructor); + } + talloc_steal(mem_ctx, ss_ctx); *srvs_ctx = ss_ctx; ret = EOK; |