From 7622d9d97eb6747a9f3406633281f2492f8f4a0a Mon Sep 17 00:00:00 2001 From: Fabiano Fidêncio Date: Fri, 2 Dec 2016 18:10:47 +0100 Subject: SBUS: Add destructor data to sbus_connection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This additions has a very specific reason: unregister a service when it's shutdown. So far, we never had to do this kind of operation because the services were started during SSSD's startup when finished when SSSD finished. Now, with the socket-activation in place the game will be a little bit different as the services will have an idle timeout and will be able shut themselves down. In order to do it properly the monitor will need to "unregister" the service and there's no way to do that without adding this destructor data to the sbus_connection structure and introducing a new function to access it from the monitor (where we're going to set the destructor function to the sbus_connection for the socket-activated services). So far it's not being used anywhere as every function taking it as parameter is just receiving NULL, but it will be used in the follow up commits, by the monitor. Related: https://fedorahosted.org/sssd/ticket/3245 Signed-off-by: Fabiano Fidêncio Reviewed-by: Pavel Březina Reviewed-by: Jakub Hrozek Reviewed-by: Lukáš Slebodník --- src/monitor/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/monitor') diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 30cd3f1a6..60b9dc2e0 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -644,7 +644,7 @@ static int monitor_dbus_init(struct mt_ctx *ctx) * lose any access. */ ret = sbus_new_server(ctx, ctx->ev, monitor_address, ctx->uid, ctx->gid, - false, &ctx->sbus_srv, monitor_service_init, ctx); + false, &ctx->sbus_srv, monitor_service_init, ctx, NULL); talloc_free(monitor_address); -- cgit