Skip to content
Snippets Groups Projects
Commit 768475c1 authored by Stephan Bosch's avatar Stephan Bosch Committed by Timo Sirainen
Browse files

lib-sieve: sieve-storage - Add event parameter to sieve_storage_create_default()

parent f8c29f75
No related branches found
No related tags found
No related merge requests found
......@@ -509,7 +509,7 @@ int sieve_storage_create(struct sieve_instance *svinst, struct event *event,
static int
sieve_storage_create_default(struct sieve_instance *svinst,
const char *location,
struct event *event, const char *location,
enum sieve_storage_flags flags,
struct sieve_storage **storage_r,
enum sieve_error *error_code_r,
......@@ -528,25 +528,25 @@ sieve_storage_create_default(struct sieve_instance *svinst,
return -1;
}
ret = sieve_storage_create(svinst, svinst->event, location, flags,
ret = sieve_storage_create(svinst, event, location, flags,
&storage, &error_code, error_r);
if (ret >= 0) {
storage->is_default = TRUE;
} else {
switch (error_code) {
case SIEVE_ERROR_NOT_FOUND:
e_debug(svinst->event, "storage: "
e_debug(event, "storage: "
"Default script location '%s' not found",
location);
break;
case SIEVE_ERROR_TEMP_FAILURE:
e_error(svinst->event, "storage: "
e_error(event, "storage: "
"Failed to access default script location '%s' "
"(temporary failure)",
location);
break;
default:
e_error(svinst->event, "storage: "
e_error(event, "storage: "
"Failed to access default script location '%s'",
location);
break;
......@@ -585,7 +585,8 @@ sieve_storage_create_default_for(struct sieve_storage *storage,
const char *error;
i_assert(storage->default_storage_for == NULL);
if (sieve_storage_create_default(svinst, storage->default_location, 0,
if (sieve_storage_create_default(svinst, svinst->event,
storage->default_location, 0,
&storage->default_storage,
&error_code, &error) < 0) {
sieve_storage_set_error(storage, error_code, "%s", error);
......@@ -731,8 +732,8 @@ int sieve_storage_create_personal(struct sieve_instance *svinst,
set_default);
}
ret = sieve_storage_create_default(svinst, set_default,
0, &storage,
ret = sieve_storage_create_default(svinst, svinst->event,
set_default, 0, &storage,
error_code_r, NULL);
}
*storage_r = storage;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.