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

lib-sieve: storage - Add sieve_storage_set_not_found_error()

parent cc51c1a3
No related branches found
No related tags found
No related merge requests found
......@@ -220,6 +220,8 @@ extern const struct sieve_storage sieve_ldap_storage;
*/
void sieve_storage_set_internal_error(struct sieve_storage *storage);
void sieve_storage_set_not_found_error(struct sieve_storage *storage,
const char *name);
void sieve_storage_copy_error(struct sieve_storage *storage,
const struct sieve_storage *source);
......
......@@ -1592,6 +1592,19 @@ void sieve_storage_set_critical(struct sieve_storage *storage,
}
}
void sieve_storage_set_not_found_error(struct sieve_storage *storage,
const char *name)
{
enum sieve_error error_code;
const char *error;
sieve_storage_clear_error(storage);
name = (name == NULL || *name == '\0' ? storage->script_name : name);
sieve_error_create_script_not_found(name, &error_code, &error);
storage->error_code = error_code;
storage->error = i_strdup(error);
}
const char *
sieve_storage_get_last_error(struct sieve_storage *storage,
enum sieve_error *error_code_r)
......
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.