From 447b0ad3a956909d72ce9de6cfa60f34ae23b437 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 21 Feb 2019 16:52:21 +0100 Subject: winbindd: switch send-next/done order In preparation of adding more logic to the done step. No change in behaviour. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13802 Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke (cherry picked from commit 8e9c2a1f6ceb06d695a6572701b96a3e3821ac42) --- source3/winbindd/wb_xids2sids.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/source3/winbindd/wb_xids2sids.c b/source3/winbindd/wb_xids2sids.c index 6555d64f8e2..d769328a15e 100644 --- a/source3/winbindd/wb_xids2sids.c +++ b/source3/winbindd/wb_xids2sids.c @@ -546,18 +546,22 @@ static void wb_xids2sids_done(struct tevent_req *subreq) state->dom_idx += 1; - if (state->dom_idx >= num_domains) { - tevent_req_done(req); + if (state->dom_idx < num_domains) { + subreq = wb_xids2sids_dom_send(state, + state->ev, + &dom_maps[state->dom_idx], + state->xids, + state->num_xids, + state->sids); + if (tevent_req_nomem(subreq, req)) { + return; + } + tevent_req_set_callback(subreq, wb_xids2sids_done, req); return; } - subreq = wb_xids2sids_dom_send( - state, state->ev, &dom_maps[state->dom_idx], - state->xids, state->num_xids, state->sids); - if (tevent_req_nomem(subreq, req)) { - return; - } - tevent_req_set_callback(subreq, wb_xids2sids_done, req); + tevent_req_done(req); + return; } NTSTATUS wb_xids2sids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, -- cgit v1.2.1