From 2d21fe079fb57e55d9bac0c69d8527013bf4fbc7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 22 Jul 2011 14:55:32 +1000 Subject: s4-messaging: fixed the removal of messaging sockets in child tasks when a child task exits we were firing a destructor on any inherited messaging contexts, which could trigger a removal of the parents message socket and messaging database entry. This adds a new auto_remove flag to imessaging_init(), and exposes the cleanup code for use by the stream service. Pair-Programmed-With: Andrew Bartlett Autobuild-User: Andrew Tridgell Autobuild-Date: Fri Jul 22 08:09:06 CEST 2011 on sn-devel-104 --- source4/lib/messaging/messaging.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/lib/messaging/messaging.h') diff --git a/source4/lib/messaging/messaging.h b/source4/lib/messaging/messaging.h index eb8a8abc79..e51590fe74 100644 --- a/source4/lib/messaging/messaging.h +++ b/source4/lib/messaging/messaging.h @@ -54,9 +54,11 @@ NTSTATUS imessaging_register(struct imessaging_context *msg, void *private_data, NTSTATUS imessaging_register_tmp(struct imessaging_context *msg, void *private_data, msg_callback_t fn, uint32_t *msg_type); struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx, - const char *dir, - struct server_id server_id, - struct tevent_context *ev); + const char *dir, + struct server_id server_id, + struct tevent_context *ev, + bool auto_remove); +int imessaging_cleanup(struct imessaging_context *msg); struct imessaging_context *imessaging_client_init(TALLOC_CTX *mem_ctx, const char *dir, struct tevent_context *ev); -- cgit