s3-rpc_server: We need a messaging context for rpc.
authorAndreas Schneider <asn@samba.org>
Wed, 9 Feb 2011 13:21:24 +0000 (14:21 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 9 Feb 2011 16:26:00 +0000 (17:26 +0100)
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Feb  9 17:26:00 CET 2011 on sn-devel-104

source3/rpc_server/rpc_server.c

index 9a7ff099da323b3e8ba91de5e0d48903881b7c02..229096e463728f7b11a3375c071d3be3fa280a6c 100644 (file)
@@ -306,6 +306,7 @@ struct named_pipe_client {
        struct ndr_syntax_id pipe_id;
 
        struct tevent_context *ev;
+       struct messaging_context *msg_ctx;
 
        uint16_t file_type;
        uint16_t device_state;
@@ -356,6 +357,7 @@ static void named_pipe_accept_function(const char *pipe_name, int fd)
        npc->pipe_name = pipe_name;
        npc->pipe_id = syntax;
        npc->ev = server_event_context();
+       npc->msg_ctx = server_messaging_context();
 
        /* make sure socket is in NON blocking state */
        ret = set_blocking(fd, false);
@@ -439,6 +441,7 @@ 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) {