dovecot-2.0: auth workers: Don't unnecessary connect to anvil.

dovecot at dovecot.org dovecot at dovecot.org
Wed Nov 3 16:59:43 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/3ce7879e3ac0
changeset: 12371:3ce7879e3ac0
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Nov 03 14:59:39 2010 +0000
description:
auth workers: Don't unnecessary connect to anvil.

diffstat:

 src/auth/main.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r b4b6bf889044 -r 3ce7879e3ac0 src/auth/main.c
--- 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. */


More information about the dovecot-cvs mailing list