s4:librpc: remove dcerpc_event_context()
authorStefan Metzmacher <metze@samba.org>
Tue, 14 Jan 2014 13:19:56 +0000 (14:19 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 16 Jan 2014 15:22:52 +0000 (16:22 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/librpc/rpc/dcerpc.c
source4/librpc/rpc/dcerpc.h

index 4ede4bc72c104e566ae341ce2a52252c5926554f..23b3c37716783eda737700db716cb7298db8547a 100644 (file)
@@ -1558,7 +1558,7 @@ static struct rpc_request *dcerpc_request_send(TALLOC_CTX *mem_ctx,
        dcerpc_schedule_io_trigger(p->conn);
 
        if (p->request_timeout) {
-               tevent_add_timer(dcerpc_event_context(p), req,
+               tevent_add_timer(p->conn->event_ctx, req,
                                timeval_current_ofs(p->request_timeout, 0), 
                                dcerpc_timeout_handler, req);
        }
@@ -1751,17 +1751,6 @@ static void dcerpc_schedule_io_trigger(struct dcecli_connection *c)
                                  c);
 }
 
-/*
-  return the event context for a dcerpc pipe
-  used by callers who wish to operate asynchronously
-*/
-_PUBLIC_ struct tevent_context *dcerpc_event_context(struct dcerpc_pipe *p)
-{
-       return p->conn->event_ctx;
-}
-
-
-
 /*
   perform the receive side of a async dcerpc request
 */
@@ -1772,7 +1761,7 @@ static NTSTATUS dcerpc_request_recv(struct rpc_request *req,
        NTSTATUS status;
 
        while (req->state != RPC_REQUEST_DONE) {
-               struct tevent_context *ctx = dcerpc_event_context(req->p);
+               struct tevent_context *ctx = req->p->conn->event_ctx;
                if (tevent_loop_once(ctx) != 0) {
                        return NT_STATUS_CONNECTION_DISCONNECTED;
                }
@@ -2233,7 +2222,7 @@ _PUBLIC_ NTSTATUS dcerpc_alter_context(struct dcerpc_pipe *p,
 
        /* TODO: create a new event context here */
 
-       subreq = dcerpc_alter_context_send(mem_ctx, p->conn->event_ctx,
+       subreq = dcerpc_alter_context_send(mem_ctx, ev,
                                           p, syntax, transfer_syntax);
        if (subreq == NULL) {
                return NT_STATUS_NO_MEMORY;
index 7075d8d878b3701a24a99ab88dff7ce64a4c962d..a0409dee38bb2c28cddae170519fac052b28b7f3 100644 (file)
@@ -199,7 +199,6 @@ NTSTATUS dcerpc_bind_auth_schannel(TALLOC_CTX *tmp_ctx,
                                   struct cli_credentials *credentials,
                                   struct loadparm_context *lp_ctx,
                                   uint8_t auth_level);
-struct tevent_context *dcerpc_event_context(struct dcerpc_pipe *p);
 NTSTATUS dcerpc_init(void);
 struct composite_context *dcerpc_secondary_smb_send(struct dcecli_connection *c1,
                                                    struct dcecli_connection *c2,