changeset 9266:e5f4cce3ef7a HEAD

Fixed using auth worker processes.
author Timo Sirainen <tss@iki.fi>
date Tue, 12 May 2009 14:04:31 -0400
parents b4dcdc5ccd8e
children 269cebf1aad4
files dovecot-master-example.conf src/auth/auth-worker-server.c
diffstat 2 files changed, 10 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
   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
+  }
+}
--- 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_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_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 @@
 
 	aqueue_deinit(&worker_request_queue);
 	array_free(&worker_request_array);
-	i_free(worker_socket_path);
 }