[dovecot-cvs] dovecot/src/master auth-process.c, 1.98, 1.99 auth-process.h, 1.10, 1.11 login-process.c, 1.90, 1.91

tss at dovecot.org tss at dovecot.org
Thu Feb 15 13:08:41 UTC 2007


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv23359

Modified Files:
	auth-process.c auth-process.h login-process.c 
Log Message:
Start auth processes immediately at startup, not after one second delay.
Don't try to start any login processes before at least one auth process has
sent back a handshake.



Index: auth-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/auth-process.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- auth-process.c	15 Dec 2006 18:38:24 -0000	1.98
+++ auth-process.c	15 Feb 2007 13:08:37 -0000	1.99
@@ -54,6 +54,8 @@
 	unsigned int in_auth_reply:1;
 };
 
+bool have_initialized_auth_processes = FALSE;
+
 static struct timeout *to;
 static unsigned int auth_tag;
 static struct auth_process_group *process_groups;
@@ -167,6 +169,8 @@
 
 	process->pid = pid;
         process->initialized = TRUE;
+
+	have_initialized_auth_processes = TRUE;
 	return TRUE;
 }
 
@@ -772,6 +776,8 @@
 {
 	process_groups = NULL;
 	to = timeout_add(1000, auth_processes_start_missing, NULL);
+
+	auth_processes_start_missing(NULL);
 }
 
 void auth_processes_deinit(void)

Index: auth-process.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/auth-process.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- auth-process.h	15 Dec 2006 18:38:24 -0000	1.10
+++ auth-process.h	15 Feb 2007 13:08:38 -0000	1.11
@@ -3,6 +3,8 @@
 
 struct login_auth_request;
 
+extern bool have_initialized_auth_processes;
+
 void auth_master_callback(const char *user, const char *const *args,
 			  struct login_auth_request *request);
 

Index: login-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/login-process.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- login-process.c	26 Jan 2007 13:58:56 -0000	1.90
+++ login-process.c	15 Feb 2007 13:08:39 -0000	1.91
@@ -793,6 +793,12 @@
 {
 	struct login_group *group;
 
+	if (!have_initialized_auth_processes) {
+		/* don't create login processes before at least one auth
+		   process has finished initializing */
+		return;
+	}
+
 	if (login_groups == NULL)
 		login_process_groups_create();
 



More information about the dovecot-cvs mailing list