dovecot-2.0: Fixed using auth worker processes.

dovecot at dovecot.org dovecot at dovecot.org
Tue May 12 21:04:39 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/e5f4cce3ef7a
changeset: 9266:e5f4cce3ef7a
user:      Timo Sirainen <tss at iki.fi>
date:      Tue May 12 14:04:31 2009 -0400
description:
Fixed using auth worker processes.

diffstat:

2 files changed, 11 insertions(+), 16 deletions(-)
dovecot-master-example.conf   |   15 ++++++++-------
src/auth/auth-worker-server.c |   12 +++---------

diffs (60 lines):

diff -r b4dcdc5ccd8e -r e5f4cce3ef7a dovecot-master-example.conf
--- a/dovecot-master-example.conf	Tue May 12 13:45:37 2009 -0400
+++ b/dovecot-master-example.conf	Tue May 12 14:04:31 2009 -0400
@@ -96,10 +96,11 @@ service pop3 {
   executable = pop3
 }
 
-#service auth-worker {
-#  executable = dovecot-auth -w
-#
-#  unix_listener {
-#    path = auth-worker
-#  }
-#}
+service auth-worker {
+  executable = dovecot-auth -w
+  client_limit = 1
+
+  unix_listener {
+    path = auth-worker
+  }
+}
diff -r b4dcdc5ccd8e -r e5f4cce3ef7a src/auth/auth-worker-server.c
--- a/src/auth/auth-worker-server.c	Tue May 12 13:45:37 2009 -0400
+++ b/src/auth/auth-worker-server.c	Tue May 12 14:04:31 2009 -0400
@@ -48,7 +48,7 @@ static struct aqueue *worker_request_que
 static struct aqueue *worker_request_queue;
 static time_t auth_worker_last_warn;
 
-static char *worker_socket_path;
+static const char *worker_socket_path;
 
 static void worker_input(struct auth_worker_connection *conn);
 static void auth_worker_destroy(struct auth_worker_connection **conn,
@@ -337,17 +337,12 @@ void auth_worker_call(struct auth_reques
 
 void auth_worker_server_init(struct auth *auth)
 {
-	const char *env;
-
 	if (array_is_created(&connections)) {
 		/* already initialized */
 		return;
 	}
 
-	env = getenv("AUTH_WORKER_PATH");
-	if (env == NULL)
-		i_fatal("AUTH_WORKER_PATH environment not set");
-	worker_socket_path = i_strdup(env);
+	worker_socket_path = "auth-worker";
 
 	i_array_init(&worker_request_array, 128);
 	worker_request_queue = aqueue_init(&worker_request_array.arr);
@@ -372,5 +367,4 @@ void auth_worker_server_deinit(void)
 
 	aqueue_deinit(&worker_request_queue);
 	array_free(&worker_request_array);
-	i_free(worker_socket_path);
-}
+}


More information about the dovecot-cvs mailing list