diff options
author | Volker Lendecke <vl@samba.org> | 2013-10-27 15:29:43 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2013-10-28 08:26:42 +0100 |
commit | 21803653bbc9dc2f23634315b92fce63e29a758c (patch) | |
tree | 9bc6280e3c771076863813b01cf998ddda7e23ba /source3 | |
parent | 871e60297fd6823bc9f7479f2375f092091958c2 (diff) | |
download | samba-21803653bbc9dc2f23634315b92fce63e29a758c.tar.gz samba-21803653bbc9dc2f23634315b92fce63e29a758c.tar.bz2 samba-21803653bbc9dc2f23634315b92fce63e29a758c.zip |
rpc_server: Remove rpc_ep_register_state->mem_ctx
We can use the state directly as a parent
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/rpc_ep_register.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/source3/rpc_server/rpc_ep_register.c b/source3/rpc_server/rpc_ep_register.c index 1b8ea0918c..42c5d946ba 100644 --- a/source3/rpc_server/rpc_ep_register.c +++ b/source3/rpc_server/rpc_ep_register.c @@ -38,7 +38,6 @@ static NTSTATUS rpc_ep_try_register(TALLOC_CTX *mem_ctx, struct rpc_ep_register_state { struct dcerpc_binding_handle *h; - TALLOC_CTX *mem_ctx; struct tevent_context *ev_ctx; struct messaging_context *msg_ctx; @@ -61,15 +60,6 @@ NTSTATUS rpc_ep_register(struct tevent_context *ev_ctx, return NT_STATUS_NO_MEMORY; } - state->mem_ctx = talloc_named(state, - 0, - "ep %s %p", - iface->name, state); - if (state->mem_ctx == NULL) { - talloc_free(state); - return NT_STATUS_NO_MEMORY; - } - state->wait_time = 1; state->ev_ctx = ev_ctx; state->msg_ctx = msg_ctx; @@ -80,7 +70,7 @@ NTSTATUS rpc_ep_register(struct tevent_context *ev_ctx, return NT_STATUS_NO_MEMORY; } - req = tevent_wakeup_send(state->mem_ctx, + req = tevent_wakeup_send(state, state->ev_ctx, timeval_current_ofs(1, 0)); if (req == NULL) { @@ -110,7 +100,7 @@ static void rpc_ep_register_loop(struct tevent_req *subreq) return; } - status = rpc_ep_try_register(state->mem_ctx, + status = rpc_ep_try_register(state, state->ev_ctx, state->msg_ctx, state->iface, @@ -118,7 +108,7 @@ static void rpc_ep_register_loop(struct tevent_req *subreq) &state->h); if (NT_STATUS_IS_OK(status)) { /* endpoint registered, monitor the connnection. */ - subreq = tevent_wakeup_send(state->mem_ctx, + subreq = tevent_wakeup_send(state, state->ev_ctx, timeval_current_ofs(MONITOR_WAIT_TIME, 0)); if (subreq == NULL) { @@ -137,7 +127,7 @@ static void rpc_ep_register_loop(struct tevent_req *subreq) state->wait_time = 16; } - subreq = tevent_wakeup_send(state->mem_ctx, + subreq = tevent_wakeup_send(state, state->ev_ctx, timeval_current_ofs(state->wait_time, 0)); if (subreq == NULL) { @@ -255,7 +245,7 @@ static void rpc_ep_monitor_loop(struct tevent_req *subreq) &result); talloc_free(tmp_ctx); - subreq = tevent_wakeup_send(state->mem_ctx, + subreq = tevent_wakeup_send(state, state->ev_ctx, timeval_current_ofs(MONITOR_WAIT_TIME, 0)); if (subreq == NULL) { |