Lines Matching defs:ectx
53 doveadm_expire_mail_match_mailbox(struct doveadm_expire_mail_cmd_context *ectx,
58 array_foreach(&ectx->queries, query) {
78 struct doveadm_expire_mail_cmd_context *ectx =
95 if (!hash_table_lookup_full(ectx->user_states, username,
111 if (!doveadm_expire_mail_match_mailbox(ectx, mailbox,
117 hash_table_update(ectx->user_states, orig_username,
127 struct doveadm_expire_mail_cmd_context *ectx =
133 while (dict_iterate(ectx->iter, &key, &value)) {
139 if ((time_t)oldest_savedate > ectx->oldest_before_time) {
144 ectx->oldest_before_time);
156 if (ret < 0 && ectx->delete_nonexistent_users) {
158 dict_unset(ectx->trans, key);
163 if (dict_iterate_deinit(&ectx->iter, &error) < 0) {
195 struct doveadm_expire_mail_cmd_context *ectx =
201 query_count = array_count(&ectx->queries);
211 array_append(&ectx->queries, &query, 1);
216 array_delete(&ectx->queries, query_count,
217 array_count(&ectx->queries) - query_count);
228 struct doveadm_expire_mail_cmd_context *ectx =
270 array_append(&ectx->queries, &query, 1);
306 struct doveadm_expire_mail_cmd_context *ectx =
325 p_array_init(&ectx->queries, ctx->pool, 8);
336 queries = array_get(&ectx->queries, &count);
354 struct doveadm_expire_mail_cmd_context *ectx =
358 if (ectx->iter != NULL) {
359 if (dict_iterate_deinit(&ectx->iter, &error) < 0)
362 if (dict_transaction_commit(&ectx->trans, &error) < 0)
364 dict_deinit(&ectx->dict);
365 hash_table_destroy(&ectx->user_states);
367 ectx->module_ctx.super.deinit(ctx);
372 struct doveadm_expire_mail_cmd_context *ectx;
398 ectx = p_new(ctx->pool, struct doveadm_expire_mail_cmd_context, 1);
399 ectx->module_ctx.super = ctx->v;
401 ectx->delete_nonexistent_users =
403 MODULE_CONTEXT_SET(ctx, doveadm_expire_mail_cmd_module, ectx);
423 ectx->oldest_before_time = (time_t)-1;
424 array_foreach(&ectx->queries, query) {
425 if (ectx->oldest_before_time > query->before_time ||
426 ectx->oldest_before_time == (time_t)-1)
427 ectx->oldest_before_time = query->before_time;
433 hash_table_create(&ectx->user_states, ctx->pool, 0, str_hash, strcmp);
437 hash_table_insert(ectx->user_states, username_dup,
441 ectx->dict = dict;
442 ectx->trans = dict_transaction_begin(dict);
443 ectx->iter = dict_iterate_init(dict, DICT_EXPIRE_PREFIX,