summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-07-08 11:38:03 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-07-14 17:22:16 +0200
commit8faee7bd9b20b389f5ae996baec849d45afc0024 (patch)
treeb727e2763b0b0cfc1868efab086b65914aa5bdba /source3
parentc69f2c4de992104e83a6e945835c47e5b919c04d (diff)
downloadsamba-8faee7bd9b20b389f5ae996baec849d45afc0024.tar.gz
samba-8faee7bd9b20b389f5ae996baec849d45afc0024.tar.bz2
samba-8faee7bd9b20b389f5ae996baec849d45afc0024.zip
s3-rpc_server: Pass event and messaging context to accept function.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Thu Jul 14 17:22:16 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/rpc_server.c19
1 files changed, 14 insertions, 5 deletions
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);