From 304e8116a9c5ac78ca9769000df73538b28e78df Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 21 Jul 2011 10:43:56 +0200 Subject: s3-rpc_server: Fix messaging context in the pipes struct. --- source3/rpc_server/rpc_server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c index 24e8103cf2..1fc0c08818 100644 --- a/source3/rpc_server/rpc_server.c +++ b/source3/rpc_server/rpc_server.c @@ -52,6 +52,7 @@ static NTSTATUS auth_anonymous_session_info(TALLOC_CTX *mem_ctx, /* Creates a pipes_struct and initializes it with the information * sent from the client */ static int make_server_pipes_struct(TALLOC_CTX *mem_ctx, + struct messaging_context *msg_ctx, const char *pipe_name, enum dcerpc_transport_t transport, bool ncalrpc_as_system, @@ -79,6 +80,7 @@ static int make_server_pipes_struct(TALLOC_CTX *mem_ctx, *perrno = ENOMEM; return -1; } + p->msg_ctx = msg_ctx; data_blob_free(&p->in_data.data); data_blob_free(&p->in_data.pdu); @@ -420,6 +422,7 @@ static void named_pipe_accept_done(struct tevent_req *subreq) } ret = make_server_pipes_struct(npc, + npc->msg_ctx, npc->pipe_name, NCACN_NP, false, npc->server, npc->client, npc->session_info, &npc->p, &error); @@ -428,7 +431,6 @@ static void named_pipe_accept_done(struct tevent_req *subreq) strerror(error))); goto fail; } - npc->p->msg_ctx = npc->msg_ctx; npc->write_queue = tevent_queue_create(npc, "np_server_write_queue"); if (!npc->write_queue) { @@ -1110,6 +1112,7 @@ static void dcerpc_ncacn_accept(struct tevent_context *ev_ctx, } rc = make_server_pipes_struct(ncacn_conn, + ncacn_conn->msg_ctx, pipe_name, ncacn_conn->transport, system_user, -- cgit