dovecot-2.2: imap: Don't waste data stack memory at startup.

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 12 01:21:38 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/b25fb761e580
changeset: 15203:b25fb761e580
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Oct 12 01:21:30 2012 +0300
description:
imap: Don't waste data stack memory at startup.

diffstat:

 src/imap/main.c |  18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diffs (37 lines):

diff -r a446d8bc2be5 -r b25fb761e580 src/imap/main.c
--- a/src/imap/main.c	Fri Oct 12 01:17:05 2012 +0300
+++ b/src/imap/main.c	Fri Oct 12 01:21:30 2012 +0300
@@ -362,12 +362,6 @@
 		}
 	}
 
-	login_set.auth_socket_path = t_abspath("auth-master");
-	if (argv[optind] != NULL)
-		login_set.postlogin_socket_path = t_abspath(argv[optind]);
-	login_set.callback = login_client_connected;
-	login_set.failure_callback = login_client_failed;
-
 	master_service_init_finish(master_service);
 	master_service_set_die_callback(master_service, imap_die);
 
@@ -387,10 +381,18 @@
 		T_BEGIN {
 			main_stdio_run(username);
 		} T_END;
-	} else {
+	} else T_BEGIN {
+		login_set.auth_socket_path = t_abspath("auth-master");
+		if (argv[optind] != NULL) {
+			login_set.postlogin_socket_path =
+				t_abspath(argv[optind]);
+		}
+		login_set.callback = login_client_connected;
+		login_set.failure_callback = login_client_failed;
+
 		master_login = master_login_init(master_service, &login_set);
 		io_loop_set_running(current_ioloop);
-	}
+	} T_END;
 
 	if (io_loop_is_running(current_ioloop))
 		master_service_run(master_service, client_connected);


More information about the dovecot-cvs mailing list