quota-clone-plugin.c (dovecot-2.3.16) | : | quota-clone-plugin.c (dovecot-2.3.17) | ||
---|---|---|---|---|
skipping to change at line 119 | skipping to change at line 119 | |||
/* Blocked by an ongoing quota calculation - try again later */ | /* Blocked by an ongoing quota calculation - try again later */ | |||
quser->quota_flushing = FALSE; | quser->quota_flushing = FALSE; | |||
return FALSE; | return FALSE; | |||
} | } | |||
/* Then update the resources that exist. The resources' existence can't | /* Then update the resources that exist. The resources' existence can't | |||
change unless the quota backend is changed, so we don't worry about | change unless the quota backend is changed, so we don't worry about | |||
the special case of lookup changing from | the special case of lookup changing from | |||
RESULT_LIMITED/RESULT_UNLIMITED to RESULT_UNKNOWN_RESOURCE, which | RESULT_LIMITED/RESULT_UNLIMITED to RESULT_UNKNOWN_RESOURCE, which | |||
leaves the old value unchanged. */ | leaves the old value unchanged. */ | |||
trans = dict_transaction_begin(quser->dict); | const struct dict_op_settings *set = mail_user_get_dict_op_settings(user) | |||
; | ||||
trans = dict_transaction_begin(quser->dict, set); | ||||
if (bytes_res == QUOTA_GET_RESULT_LIMITED || | if (bytes_res == QUOTA_GET_RESULT_LIMITED || | |||
bytes_res == QUOTA_GET_RESULT_UNLIMITED) { | bytes_res == QUOTA_GET_RESULT_UNLIMITED) { | |||
dict_set(trans, DICT_QUOTA_CLONE_BYTES_PATH, | dict_set(trans, DICT_QUOTA_CLONE_BYTES_PATH, | |||
t_strdup_printf("%"PRIu64, bytes_value)); | t_strdup_printf("%"PRIu64, bytes_value)); | |||
} | } | |||
if (count_res == QUOTA_GET_RESULT_LIMITED || | if (count_res == QUOTA_GET_RESULT_LIMITED || | |||
count_res == QUOTA_GET_RESULT_UNLIMITED) { | count_res == QUOTA_GET_RESULT_UNLIMITED) { | |||
dict_set(trans, DICT_QUOTA_CLONE_COUNT_PATH, | dict_set(trans, DICT_QUOTA_CLONE_COUNT_PATH, | |||
t_strdup_printf("%"PRIu64, count_value)); | t_strdup_printf("%"PRIu64, count_value)); | |||
} | } | |||
skipping to change at line 275 | skipping to change at line 276 | |||
struct dict *dict; | struct dict *dict; | |||
const char *uri, *error; | const char *uri, *error; | |||
uri = mail_user_plugin_getenv(user, "quota_clone_dict"); | uri = mail_user_plugin_getenv(user, "quota_clone_dict"); | |||
if (uri == NULL || uri[0] == '\0') { | if (uri == NULL || uri[0] == '\0') { | |||
e_debug(user->event, "The quota_clone_dict setting is missing fro m configuration"); | e_debug(user->event, "The quota_clone_dict setting is missing fro m configuration"); | |||
return; | return; | |||
} | } | |||
i_zero(&dict_set); | i_zero(&dict_set); | |||
dict_set.username = user->username; | ||||
dict_set.base_dir = user->set->base_dir; | dict_set.base_dir = user->set->base_dir; | |||
dict_set.event_parent = user->event; | dict_set.event_parent = user->event; | |||
(void)mail_user_get_home(user, &dict_set.home_dir); | ||||
if (dict_init(uri, &dict_set, &dict, &error) < 0) { | if (dict_init(uri, &dict_set, &dict, &error) < 0) { | |||
i_error("quota_clone_dict: Failed to initialize '%s': %s", | i_error("quota_clone_dict: Failed to initialize '%s': %s", | |||
uri, error); | uri, error); | |||
return; | return; | |||
} | } | |||
quser = p_new(user->pool, struct quota_clone_user, 1); | quser = p_new(user->pool, struct quota_clone_user, 1); | |||
quser->module_ctx.super = *v; | quser->module_ctx.super = *v; | |||
user->vlast = &quser->module_ctx.super; | user->vlast = &quser->module_ctx.super; | |||
v->deinit_pre = quota_clone_mail_user_deinit_pre; | v->deinit_pre = quota_clone_mail_user_deinit_pre; | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |