From 4e2a152169175b18f5fac45b25a8d8c8a5bea2b5 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 15 Dec 2008 15:54:08 -0500 Subject: Modified sbus_server_new() to take a talloc memory context to use as a parent for the new server context object. --- server/sbus/sssd_dbus.h | 3 ++- server/sbus/sssd_dbus_server.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'server/sbus') diff --git a/server/sbus/sssd_dbus.h b/server/sbus/sssd_dbus.h index 398469945..cf59a22f9 100644 --- a/server/sbus/sssd_dbus.h +++ b/server/sbus/sssd_dbus.h @@ -67,7 +67,8 @@ struct sbus_message_handler_ctx { }; /* Server Functions */ -int sbus_new_server(struct event_context *ev, struct sbus_method_ctx *ctx, +int sbus_new_server(TALLOC_CTX *mem_ctx, + struct event_context *ev, struct sbus_method_ctx *ctx, struct sbus_srv_ctx **server_ctx, const char *address, sbus_server_conn_init_fn init_fn, void *init_pvt_data); diff --git a/server/sbus/sssd_dbus_server.c b/server/sbus/sssd_dbus_server.c index d1d937393..4f38345cd 100644 --- a/server/sbus/sssd_dbus_server.c +++ b/server/sbus/sssd_dbus_server.c @@ -253,7 +253,8 @@ static void sbus_server_init_new_connection(DBusServer *server, * Set up a D-BUS server, integrate with the event loop * for handling file descriptor and timed events */ -int sbus_new_server(struct event_context *ev, struct sbus_method_ctx *ctx, +int sbus_new_server(TALLOC_CTX *mem_ctx, + struct event_context *ev, struct sbus_method_ctx *ctx, struct sbus_srv_ctx **server_ctx, const char *address, sbus_server_conn_init_fn init_fn, void *init_pvt_data) { @@ -278,7 +279,7 @@ int sbus_new_server(struct event_context *ev, struct sbus_method_ctx *ctx, DEBUG(3, ("D-BUS Server listening on %s\n", tmp)); free(tmp); - srv_ctx = talloc_zero(ev, struct sbus_srv_ctx); + srv_ctx = talloc_zero(mem_ctx, struct sbus_srv_ctx); if (!srv_ctx) { return ENOMEM; } -- cgit