From: Stefan Metzmacher Date: Wed, 14 Feb 2018 14:09:51 +0000 (+0100) Subject: winbind: use state->{ev,request} in wb_domain_request_send() X-Git-Tag: ldb-1.3.2~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d804f5f3e65df0e2f646d4f88793cab8e2f32d1;p=thirdparty%2Fsamba.git winbind: use state->{ev,request} in wb_domain_request_send() This will reduce the diff for the following changes. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13295 Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke --- diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index d0a40a8bac4..cd67aece664 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -354,11 +354,15 @@ struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx, return NULL; } + state->domain = domain; + state->ev = ev; + state->request = request; + state->child = choose_domain_child(domain); if (domain->initialized) { - subreq = wb_child_request_send(state, ev, state->child, - request); + subreq = wb_child_request_send(state, state->ev, state->child, + state->request); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } @@ -366,10 +370,6 @@ struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx, return req; } - state->domain = domain; - state->ev = ev; - state->request = request; - state->init_req = talloc_zero(state, struct winbindd_request); if (tevent_req_nomem(state->init_req, req)) { return tevent_req_post(req, ev); @@ -382,7 +382,7 @@ struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx, state->init_req->data.init_conn.is_primary = domain->primary; fstrcpy(state->init_req->data.init_conn.dcname, ""); - subreq = wb_child_request_send(state, ev, state->child, + subreq = wb_child_request_send(state, state->ev, state->child, state->init_req); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); @@ -403,7 +403,8 @@ struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx, state->init_req->cmd = WINBINDD_GETDCNAME; fstrcpy(state->init_req->domain_name, domain->name); - subreq = wb_child_request_send(state, ev, state->child, request); + subreq = wb_child_request_send(state, state->ev, state->child, + state->request); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); }