diff options
Diffstat (limited to 'source4/smbd')
-rw-r--r-- | source4/smbd/config.mk | 2 | ||||
-rw-r--r-- | source4/smbd/process_thread.c | 3 | ||||
-rw-r--r-- | source4/smbd/service.c | 5 | ||||
-rw-r--r-- | source4/smbd/service.h | 2 |
4 files changed, 10 insertions, 2 deletions
diff --git a/source4/smbd/config.mk b/source4/smbd/config.mk index 5aa04725b4..55f040f805 100644 --- a/source4/smbd/config.mk +++ b/source4/smbd/config.mk @@ -37,6 +37,8 @@ REQUIRED_SUBSYSTEMS = \ [SUBSYSTEM::SERVER_SERVICE] INIT_OBJ_FILES = \ smbd/service.o +REQUIRED_SUBSYSTEMS = \ + MESSAGING # End SUBSYSTEM SERVER ####################### diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c index 85f30c9ddd..108b098b8a 100644 --- a/source4/smbd/process_thread.c +++ b/source4/smbd/process_thread.c @@ -72,7 +72,7 @@ static void thread_accept_connection(struct event_context *ev, struct fd_event * main event_context is continued. */ - ev = event_context_init(); + ev = event_context_init(server_socket); if (!ev) { DEBUG(0,("thread_accept_connection: failed to create event_context!\n")); socket_destroy(sock); @@ -87,6 +87,7 @@ static void thread_accept_connection(struct event_context *ev, struct fd_event * return; } + talloc_steal(conn, ev); talloc_steal(conn, sock); /* TODO: is this MUTEX_LOCK in the right place here? diff --git a/source4/smbd/service.c b/source4/smbd/service.c index 9a7ac73559..d4ba9c990c 100644 --- a/source4/smbd/service.c +++ b/source4/smbd/service.c @@ -48,7 +48,7 @@ struct server_context *server_service_startup(const char *model) ZERO_STRUCTP(srv_ctx); - srv_ctx->events = event_context_init(); + srv_ctx->events = event_context_init(srv_ctx); if (!srv_ctx->events) { DEBUG(0,("event_context_init() failed\n")); return NULL; @@ -247,6 +247,9 @@ struct server_connection *server_setup_connection(struct event_context *ev, return NULL; } + /* setup to receive internal messages on this connection */ + srv_conn->messaging_ctx = messaging_init(srv_conn, srv_conn->server_id, ev); + return srv_conn; } diff --git a/source4/smbd/service.h b/source4/smbd/service.h index e9ef0bff06..93f24a34f9 100644 --- a/source4/smbd/service.h +++ b/source4/smbd/service.h @@ -124,6 +124,8 @@ struct server_connection { struct server_socket *server_socket; struct server_service *service; + + void *messaging_ctx; }; #endif /* _SERVER_SERVICE_H */ |