Lines Matching refs:list_ctx

309 static int ifp_users_list_copy(struct ifp_list_ctx *list_ctx,
314 copy_count = ifp_list_ctx_remaining_capacity(list_ctx, result->count);
317 list_ctx->paths[list_ctx->path_count + i] = \
318 ifp_users_build_path_from_msg(list_ctx->paths,
319 list_ctx->dom,
321 if (list_ctx->paths[list_ctx->path_count + i] == NULL) {
326 list_ctx->path_count += copy_count;
330 static int ifp_users_list_by_name_step(struct ifp_list_ctx *list_ctx);
332 static void ifp_users_list_by_name_reply(struct ifp_list_ctx *list_ctx);
340 struct ifp_list_ctx *list_ctx;
348 list_ctx = ifp_list_ctx_new(sbus_req, ctx, filter, limit);
349 if (list_ctx == NULL) {
353 return ifp_users_list_by_name_step(list_ctx);
356 static int ifp_users_list_by_name_step(struct ifp_list_ctx *list_ctx)
360 req = cache_req_user_by_filter_send(list_ctx,
361 list_ctx->ctx->rctx->ev,
362 list_ctx->ctx->rctx,
363 list_ctx->dom->name,
364 list_ctx->filter);
369 ifp_users_list_by_name_done, list_ctx);
377 struct ifp_list_ctx *list_ctx;
383 list_ctx = tevent_req_callback_data(req, struct ifp_list_ctx);
384 sbus_req = list_ctx->sbus_req;
395 ret = ifp_users_list_copy(list_ctx, result);
403 list_ctx->dom = get_next_domain(list_ctx->dom, SSS_GND_DESCEND);
404 if (list_ctx->dom == NULL) {
405 return ifp_users_list_by_name_reply(list_ctx);
408 ret = ifp_users_list_by_name_step(list_ctx);
417 static void ifp_users_list_by_name_reply(struct ifp_list_ctx *list_ctx)
419 iface_ifp_users_ListByName_finish(list_ctx->sbus_req,
420 list_ctx->paths,
421 list_ctx->path_count);
434 struct ifp_list_ctx *list_ctx;
442 list_ctx = ifp_list_ctx_new(sbus_req, ctx, filter, limit);
443 if (list_ctx == NULL) {
447 req = cache_req_user_by_filter_send(list_ctx, ctx->rctx->ev, ctx->rctx,
453 ifp_users_list_by_domain_and_name_done, list_ctx);
461 struct ifp_list_ctx *list_ctx;
468 list_ctx = tevent_req_callback_data(req, struct ifp_list_ctx);
469 sbus_req = list_ctx->sbus_req;
483 copy_count = ifp_list_ctx_remaining_capacity(list_ctx, result->count);
486 list_ctx->paths[i] = ifp_users_build_path_from_msg(list_ctx->paths,
487 list_ctx->dom,
489 if (list_ctx->paths[i] == NULL) {
496 list_ctx->path_count += copy_count;
505 list_ctx->paths,
506 list_ctx->path_count);