[dovecot-cvs] dovecot/src/auth main.c,1.12,1.13 master.c,1.9,1.10

cras at procontrol.fi cras at procontrol.fi
Wed Jan 8 23:13:07 EET 2003


Update of /home/cvs/dovecot/src/auth
In directory danu:/tmp/cvs-serv21783/auth

Modified Files:
	main.c master.c 
Log Message:
Auth and login processes send an "we're ok" reply at the end of
initialization. If the process dies before master receives that reply, it
shutdowns itself. Usually this is because of some configuration error and
it's not nice to start spamming the log files.



Index: main.c
===================================================================
RCS file: /home/cvs/dovecot/src/auth/main.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- main.c	5 Jan 2003 13:09:51 -0000	1.12
+++ main.c	8 Jan 2003 21:13:05 -0000	1.13
@@ -72,11 +72,13 @@
 	auth_init();
 	cookies_init();
 	login_connections_init();
-	master_init();
 	userinfo_init();
 
 	io_listen = io_add_priority(LOGIN_LISTEN_FD, IO_PRIORITY_LOW,
 				    IO_READ, auth_accept, NULL);
+
+	/* initialize master last - it sends the "we're ok" notification */
+	master_init();
 }
 
 static void main_deinit(void)

Index: master.c
===================================================================
RCS file: /home/cvs/dovecot/src/auth/master.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- master.c	5 Jan 2003 13:09:51 -0000	1.9
+++ master.c	8 Jan 2003 21:13:05 -0000	1.10
@@ -77,6 +77,10 @@
 				      MAX_OUTBUF_SIZE, IO_PRIORITY_DEFAULT,
 				      FALSE);
 	io_master = io_add(MASTER_SOCKET_FD, IO_READ, master_input, NULL);
+
+	/* just a note to master that we're ok. if we die before,
+	   master should shutdown itself. */
+	o_stream_send(output, "O", 1);
 }
 
 void master_deinit(void)




More information about the dovecot-cvs mailing list