Lines Matching refs:state

56     struct hosts_get_state *state;
59 req = tevent_req_create(memctx, &state, struct hosts_get_state);
62 state->ev = ev;
63 state->id_ctx = id_ctx;
64 state->dp_error = DP_ERR_FATAL;
66 state->op = sdap_id_op_create(state, id_ctx->conn->conn_cache);
67 if (!state->op) {
73 state->domain = id_ctx->be->domain;
74 state->name = name;
75 state->alias = alias;
93 struct hosts_get_state *state = tevent_req_data(req,
98 subreq = sdap_id_op_connect_send(state->op, state, &ret);
112 struct hosts_get_state *state = tevent_req_data(req,
121 state->dp_error = dp_error;
126 subreq = sdap_host_info_send(state, state->ev,
127 sdap_id_op_handle(state->op),
128 state->id_ctx->opts, state->name,
129 state->id_ctx->opts->host_map,
130 state->id_ctx->opts->sdom->host_search_bases);
143 struct hosts_get_state *state = tevent_req_data(req,
150 ret = sdap_host_info_recv(subreq, state,
151 &state->count, &state->hosts);
154 ret = sdap_id_op_done(state->op, ret, &dp_error);
168 if (state->count == 0) {
170 "No host with name [%s] found.\n", state->name);
172 ret = sysdb_delete_ssh_host(state->domain, state->name);
181 if (state->count > 1) {
183 "Found more than one host with name [%s].\n", state->name);
188 attrs = sysdb_new_attrs(state);
195 ret = sysdb_attrs_copy_values(state->hosts[0], attrs, SYSDB_SSH_PUBKEY);
200 ret = sysdb_store_ssh_host(state->domain, state->name, state->alias,
201 state->domain->ssh_host_timeout, now, attrs);
209 state->dp_error = dp_error;
221 struct hosts_get_state *state = tevent_req_data(req,
225 *dp_error_out = state->dp_error;
245 struct sdap_hostid_handler_state *state;
250 req = tevent_req_create(mem_ctx, &state, struct sdap_hostid_handler_state);
256 subreq = hosts_get_send(state, params->ev, id_ctx,
269 dp_reply_std_set(&state->reply, DP_ERR_DECIDE, ret, NULL);
280 struct sdap_hostid_handler_state *state;
286 state = tevent_req_data(req, struct sdap_hostid_handler_state);
292 dp_reply_std_set(&state->reply, dp_error, ret, NULL);
301 struct sdap_hostid_handler_state *state = NULL;
303 state = tevent_req_data(req, struct sdap_hostid_handler_state);
307 *data = state->reply;