summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2021-01-14 12:20:43 +0100
committerJeremy Allison <jra@samba.org>2021-01-22 19:54:37 +0000
commitb417fd19675bb2d987abc768695c0b2feb1f637a (patch)
treede34349c7bf3f93959d5a2c586a10766834ca2c0 /librpc
parentec4850d5205b0b568221124a628153a99e6c1e7f (diff)
downloadsamba-b417fd19675bb2d987abc768695c0b2feb1f637a.tar.gz
rpc_server: Slightly simplify dcesrv_bind()
Factor out dereferencing conn->dce_ctx Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r--librpc/rpc/dcesrv_core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c
index 67f5fc78543..0faf9063957 100644
--- a/librpc/rpc/dcesrv_core.c
+++ b/librpc/rpc/dcesrv_core.c
@@ -920,6 +920,7 @@ static void dcesrv_bind_done(struct tevent_req *subreq);
static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
{
struct dcesrv_connection *conn = call->conn;
+ struct dcesrv_context *dce_ctx = conn->dce_ctx;
struct ncacn_packet *pkt = &call->ack_pkt;
NTSTATUS status;
uint32_t extra_flags = 0;
@@ -966,7 +967,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
conn->max_recv_frag = max_rep;
conn->max_xmit_frag = max_rep;
- status = conn->dce_ctx->callbacks.assoc_group.find(call);
+ status = dce_ctx->callbacks.assoc_group.find(call);
if (!NT_STATUS_IS_OK(status)) {
DBG_NOTICE("Failed to find assoc_group 0x%08x: %s\n",
call->pkt.u.bind.assoc_group_id, nt_errstr(status));
@@ -1097,7 +1098,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
}
/* setup a bind_ack */
- dcesrv_init_hdr(pkt, lpcfg_rpc_big_endian(conn->dce_ctx->lp_ctx));
+ dcesrv_init_hdr(pkt, lpcfg_rpc_big_endian(dce_ctx->lp_ctx));
pkt->auth_length = 0;
pkt->call_id = call->pkt.call_id;
pkt->ptype = DCERPC_PKT_BIND_ACK;