Mercurial > dovecot > core-2.2
changeset 12371:3ce7879e3ac0
auth workers: Don't unnecessary connect to anvil.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 03 Nov 2010 14:59:39 +0000 |
parents | b4b6bf889044 |
children | 4d91cec713cf |
files | src/auth/main.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/main.c Wed Nov 03 13:33:02 2010 +0000 +++ b/src/auth/main.c Wed Nov 03 14:59:39 2010 +0000 @@ -111,7 +111,8 @@ modules = module_dir_load(AUTH_MODULE_DIR, NULL, &mod_set); module_dir_init(modules); - auth_penalty = auth_penalty_init(AUTH_PENALTY_ANVIL_PATH); + if (!worker) + auth_penalty = auth_penalty_init(AUTH_PENALTY_ANVIL_PATH); mech_init(global_auth_settings); mech_reg = mech_register_init(global_auth_settings); auths_preinit(global_auth_settings, auth_set_pool, @@ -152,8 +153,10 @@ static void main_deinit(void) { - /* cancel all pending anvil penalty lookups */ - auth_penalty_deinit(&auth_penalty); + if (auth_penalty != NULL) { + /* cancel all pending anvil penalty lookups */ + auth_penalty_deinit(&auth_penalty); + } /* deinit auth workers, which aborts pending requests */ auth_worker_server_deinit(); /* deinit passdbs and userdbs. it aborts any pending async requests. */