From ef7f4a142068757dcf0dc11c5b7cf03755be45a8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Nov 2010 10:12:22 +1100 Subject: s4-server: make server sockets a child of the task context We previously allocated sockets as direct children of the event context. That led to crashes if a service called task_server_terminate(), as it left the socket open and handling events for a dead protocol. Making them a child of the task allows the task to terminate and take all its sockets with it. Pair-Programmed-With: Andrew Bartlett --- source4/smb_server/smb_server.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/smb_server/smb_server.h') diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h index 4399dc8c70..6088853743 100644 --- a/source4/smb_server/smb_server.h +++ b/source4/smb_server/smb_server.h @@ -395,10 +395,11 @@ struct smbsrv_connection { struct model_ops; struct loadparm_context; -NTSTATUS smbsrv_add_socket(struct tevent_context *event_context, +NTSTATUS smbsrv_add_socket(TALLOC_CTX *mem_ctx, + struct tevent_context *event_context, struct loadparm_context *lp_ctx, - const struct model_ops *model_ops, - const char *address); + const struct model_ops *model_ops, + const char *address); struct loadparm_context; -- cgit