From ef946eebf0520607c1c7c72c80b51de63d9d941e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 19 Nov 2008 14:20:15 -0500 Subject: Add some infrastructure code to add data providers. This currently breacks the dameon because of a problem with destroying the monitor dbus server in the children after fork() --- server/monitor.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'server/monitor.c') diff --git a/server/monitor.c b/server/monitor.c index b85b7d60d..40f25c339 100644 --- a/server/monitor.c +++ b/server/monitor.c @@ -300,6 +300,14 @@ int start_monitor(TALLOC_CTX *mem_ctx, if (ret != EOK) return ret; + /* Initialize D-BUS Server + * The monitor will act as a D-BUS server for all + * SSSD processes */ + ret = monitor_dbus_init(ctx); + if (ret != EOK) { + return ret; + } + for (i = 0; ctx->services[i]; i++) { svc = talloc_zero(ctx, struct mt_svc); @@ -322,14 +330,6 @@ int start_monitor(TALLOC_CTX *mem_ctx, set_tasks_checker(svc); } - /* Initialize D-BUS Server - * The monitor will act as a D-BUS server for all - * SSSD processes */ - ret = monitor_dbus_init(ctx); - if (ret != EOK) { - return ret; - } - return EOK; } @@ -355,7 +355,8 @@ static int mt_conn_destructor(void *ptr) * method on the new client). The reply callback for this request * should set the connection destructor appropriately. */ -static int dbus_service_init(struct sbus_conn_ctx *conn_ctx, void *data) { +static int dbus_service_init(struct sbus_conn_ctx *conn_ctx, void *data) +{ struct mt_ctx *ctx; struct mt_svc *svc; struct mt_conn *mt_conn; -- cgit