Lines Matching defs:task
50 struct task {
149 struct task *task;
155 task = tevent_req_callback_data(req, struct task);
157 task->test_ctx->tasks--;
161 fail_if(recv_status != task->recv, "%s: Expected return of %d, got %d",
162 task->location, task->recv, recv_status);
167 fail_if(port != task->port, "%s: Expected port %d, got %d", task->location,
168 task->port, port);
170 if (task->new_port_status >= 0)
171 fo_set_port_status(server, task->new_port_status);
172 if (task->new_server_status >= 0)
173 fo_set_server_status(server, task->new_server_status);
186 if (task->new_port_status == PORT_WORKING
187 && task->new_server_status == SERVER_WORKING) {
188 active_server = fo_get_active_server(task->service);
204 struct task *task;
206 task = talloc(test_ctx, struct task);
207 fail_if(task == NULL);
209 task->test_ctx = test_ctx;
210 task->recv = expected_recv;
211 task->port = expected_port;
212 task->new_port_status = new_port_status;
213 task->new_server_status = new_server_status;
214 task->location = location;
215 task->service = service;
223 tevent_req_set_callback(req, test_resolve_service_callback, task);