diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2008-12-15 15:54:08 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-12-15 15:56:16 -0500 |
commit | 4e2a152169175b18f5fac45b25a8d8c8a5bea2b5 (patch) | |
tree | b3064bf9789e11eeb69cdbb806e4279fc3e60c51 /server/sbus | |
parent | 519a8e9cba9df29a396d6509fb71a10ef1aacec0 (diff) | |
download | sssd-4e2a152169175b18f5fac45b25a8d8c8a5bea2b5.tar.gz sssd-4e2a152169175b18f5fac45b25a8d8c8a5bea2b5.tar.xz sssd-4e2a152169175b18f5fac45b25a8d8c8a5bea2b5.zip |
Modified sbus_server_new() to take a talloc memory context to use
as a parent for the new server context object.
Diffstat (limited to 'server/sbus')
-rw-r--r-- | server/sbus/sssd_dbus.h | 3 | ||||
-rw-r--r-- | server/sbus/sssd_dbus_server.c | 5 |
2 files changed, 5 insertions, 3 deletions
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; } |