Skip to content
Snippets Groups Projects
Commit 0e68299a authored by Stephan Bosch's avatar Stephan Bosch Committed by Stephan Bosch
Browse files

lib-sieve: sieve-error - Drop error handler hierarchy.

It is no longer used.
parent 04f40d52
No related branches found
No related tags found
No related merge requests found
...@@ -20,8 +20,6 @@ struct sieve_error_handler { ...@@ -20,8 +20,6 @@ struct sieve_error_handler {
struct sieve_instance *svinst; struct sieve_instance *svinst;
struct sieve_error_handler *parent;
unsigned int max_errors; unsigned int max_errors;
unsigned int errors; unsigned int errors;
...@@ -43,10 +41,6 @@ void sieve_error_handler_init(struct sieve_error_handler *ehandler, ...@@ -43,10 +41,6 @@ void sieve_error_handler_init(struct sieve_error_handler *ehandler,
struct sieve_instance *svinst, pool_t pool, struct sieve_instance *svinst, pool_t pool,
unsigned int max_errors); unsigned int max_errors);
void sieve_error_handler_init_from_parent(struct sieve_error_handler *ehandler,
pool_t pool,
struct sieve_error_handler *parent);
/* /*
* Direct handler calls * Direct handler calls
*/ */
......
...@@ -591,19 +591,13 @@ bool sieve_errors_more_allowed(struct sieve_error_handler *ehandler) ...@@ -591,19 +591,13 @@ bool sieve_errors_more_allowed(struct sieve_error_handler *ehandler)
void sieve_error_handler_accept_infolog(struct sieve_error_handler *ehandler, void sieve_error_handler_accept_infolog(struct sieve_error_handler *ehandler,
bool enable) bool enable)
{ {
while (ehandler != NULL) { ehandler->log_info = enable;
ehandler->log_info = enable;
ehandler = ehandler->parent;
}
} }
void sieve_error_handler_accept_debuglog(struct sieve_error_handler *ehandler, void sieve_error_handler_accept_debuglog(struct sieve_error_handler *ehandler,
bool enable) bool enable)
{ {
while (ehandler != NULL) { ehandler->log_debug = enable;
ehandler->log_debug = enable;
ehandler = ehandler->parent;
}
} }
/* /*
...@@ -623,23 +617,6 @@ void sieve_error_handler_init(struct sieve_error_handler *ehandler, ...@@ -623,23 +617,6 @@ void sieve_error_handler_init(struct sieve_error_handler *ehandler,
ehandler->warnings = 0; ehandler->warnings = 0;
} }
void sieve_error_handler_init_from_parent(struct sieve_error_handler *ehandler,
pool_t pool,
struct sieve_error_handler *parent)
{
i_assert(parent != NULL);
sieve_error_handler_init(ehandler, parent->svinst, pool,
parent->max_errors);
ehandler->parent = parent;
sieve_error_handler_ref(parent);
ehandler->master_log = parent->master_log;
ehandler->log_info = parent->log_info;
ehandler->log_debug = parent->log_debug;
}
void sieve_error_handler_ref(struct sieve_error_handler *ehandler) void sieve_error_handler_ref(struct sieve_error_handler *ehandler)
{ {
if (ehandler == NULL || ehandler->pool == NULL) if (ehandler == NULL || ehandler->pool == NULL)
...@@ -658,8 +635,6 @@ void sieve_error_handler_unref(struct sieve_error_handler **ehandler) ...@@ -658,8 +635,6 @@ void sieve_error_handler_unref(struct sieve_error_handler **ehandler)
if (--(*ehandler)->refcount != 0) if (--(*ehandler)->refcount != 0)
return; return;
if ((*ehandler)->parent != NULL)
sieve_error_handler_unref(&(*ehandler)->parent);
if ((*ehandler)->free != NULL) if ((*ehandler)->free != NULL)
(*ehandler)->free(*ehandler); (*ehandler)->free(*ehandler);
......
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.