From 8faee7bd9b20b389f5ae996baec849d45afc0024 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 8 Jul 2011 11:38:03 +0200 Subject: s3-rpc_server: Pass event and messaging context to accept function. Autobuild-User: Andreas Schneider Autobuild-Date: Thu Jul 14 17:22:16 CEST 2011 on sn-devel-104 --- source3/rpc_server/rpc_server.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'source3/rpc_server/rpc_server.c') diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c index a54ade4875..2dffaff3f0 100644 --- a/source3/rpc_server/rpc_server.c +++ b/source3/rpc_server/rpc_server.c @@ -282,7 +282,10 @@ out: return false; } -static void named_pipe_accept_function(const char *pipe_name, int fd); +static void named_pipe_accept_function(struct tevent_context *ev_ctx, + struct messaging_context *msg_ctx, + const char *pipe_name, + int fd); static void named_pipe_listener(struct tevent_context *ev, struct tevent_fd *fde, @@ -313,7 +316,10 @@ static void named_pipe_listener(struct tevent_context *ev, DEBUG(6, ("Accepted socket %d\n", sd)); - named_pipe_accept_function(state->ep.name, sd); + named_pipe_accept_function(state->ev_ctx, + state->msg_ctx, + state->ep.name, + sd); } @@ -350,7 +356,10 @@ struct named_pipe_client { static void named_pipe_accept_done(struct tevent_req *subreq); -static void named_pipe_accept_function(const char *pipe_name, int fd) +static void named_pipe_accept_function(struct tevent_context *ev_ctx, + struct messaging_context *msg_ctx, + const char *pipe_name, + int fd) { struct named_pipe_client *npc; struct tstream_context *plain; @@ -364,8 +373,8 @@ static void named_pipe_accept_function(const char *pipe_name, int fd) return; } npc->pipe_name = pipe_name; - npc->ev = server_event_context(); - npc->msg_ctx = server_messaging_context(); + npc->ev = ev_ctx; + npc->msg_ctx = msg_ctx; /* make sure socket is in NON blocking state */ ret = set_blocking(fd, false); -- cgit