Lines Matching refs:state
44 struct cmd_getdcname_state *state;
49 state = talloc(result, struct cmd_getdcname_state);
50 if (state == NULL) goto failed;
51 state->ctx = result;
52 result->private_data = state;
54 state->domain_name = talloc_strdup(state, domain_name);
55 if (state->domain_name == NULL) goto failed;
57 ctx = wb_sid2domain_send(state, service, service->primary_sid);
61 ctx->async.private_data = state;
71 struct cmd_getdcname_state *state =
77 state->ctx->status = wb_sid2domain_recv(ctx, &domain);
78 if (!composite_is_ok(state->ctx)) return;
80 state->g.in.logon_server = talloc_asprintf(
81 state, "\\\\%s",
83 state->g.in.domainname = state->domain_name;
84 state->g.out.dcname = talloc(state, const char *);
86 req = dcerpc_netr_GetAnyDCName_send(domain->netlogon_pipe, state,
87 &state->g);
88 if (composite_nomem(req, state->ctx)) return;
90 composite_continue_rpc(state->ctx, req, getdcname_recv_dcname, state);
95 struct cmd_getdcname_state *state =
99 state->ctx->status = dcerpc_ndr_request_recv(req);
100 if (!composite_is_ok(state->ctx)) return;
101 state->ctx->status = werror_to_ntstatus(state->g.out.result);
102 if (!composite_is_ok(state->ctx)) return;
104 composite_done(state->ctx);
111 struct cmd_getdcname_state *state =
115 const char *p = *(state->g.out.dcname);
123 talloc_free(state);