summaryrefslogtreecommitdiffstats
path: root/server/monitor
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-08-05 05:44:20 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-08-10 09:42:19 -0400
commitf1e4471551aa74015579bff0b64735cc9b085b74 (patch)
tree45071c03d3f4810e8214a9097c36b21641d9cfc3 /server/monitor
parent0c7050d8569ce7ee61b13d02b4733249a11e171f (diff)
downloadsssd-f1e4471551aa74015579bff0b64735cc9b085b74.tar.gz
sssd-f1e4471551aa74015579bff0b64735cc9b085b74.tar.xz
sssd-f1e4471551aa74015579bff0b64735cc9b085b74.zip
merge server and connection structures
This reduce code duplication as it allows to use one set of watch and timeout functions, and at the same time also allow not to use a secondary structure just to unify these functions.
Diffstat (limited to 'server/monitor')
-rw-r--r--server/monitor/monitor.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c
index a2b2de587..7a27c4ec7 100644
--- a/server/monitor/monitor.c
+++ b/server/monitor/monitor.c
@@ -113,7 +113,7 @@ struct mt_ctx {
TALLOC_CTX *service_ctx; /* Memory context for services */
char **services;
struct mt_svc *svc_list;
- struct sbus_srv_ctx *sbus_srv;
+ struct sbus_connection *sbus_srv;
struct config_file_ctx *file_ctx;
int inotify_fd;
int service_id_timeout;
@@ -180,7 +180,6 @@ struct sbus_method monitor_methods[] = {
static int monitor_dbus_init(struct mt_ctx *ctx)
{
struct sbus_method_ctx *sd_ctx;
- struct sbus_srv_ctx *sbus_srv;
char *monitor_address;
int ret;
@@ -210,8 +209,8 @@ static int monitor_dbus_init(struct mt_ctx *ctx)
sd_ctx->methods = monitor_methods;
sd_ctx->message_handler = sbus_message_handler;
- ret = sbus_new_server(ctx, ctx->ev, sd_ctx, &sbus_srv, monitor_address, dbus_service_init, ctx);
- ctx->sbus_srv = sbus_srv;
+ ret = sbus_new_server(ctx, ctx->ev, monitor_address, sd_ctx,
+ &ctx->sbus_srv, dbus_service_init, ctx);
talloc_free(monitor_address);