For the first run this is a no-op, but it simplified the caller.
We'll call wb_sids2xids_next_sids2unix() in a few more places in future
and it's easier to have this all within wb_sids2xids_next_sids2unix().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14539
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
struct tevent_req *subreq = NULL;
struct dcerpc_binding_handle *child_binding_handle = NULL;
+ state->tried_dclookup = false;
+
+ if (state->dom_index == state->idmap_doms.count) {
+ tevent_req_done(req);
+ return;
+ }
+
state->dom_ids = wb_sids2xids_extract_for_domain_index(
state, &state->ids, state->dom_index);
if (tevent_req_nomem(state->dom_ids, req)) {
TALLOC_FREE(state->dom_ids);
state->dom_index += 1;
- state->tried_dclookup = false;
-
- if (state->dom_index == state->idmap_doms.count) {
- tevent_req_done(req);
- return;
- }
wb_sids2xids_next_sids2unix(req);
}