dovecot-1.2: login processes: When shutting down, don't die with...

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 18 20:50:23 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/6f2bb9f58804
changeset: 8293:6f2bb9f58804
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Oct 18 20:50:20 2008 +0300
description:
login processes: When shutting down, don't die with fd_send() error message.

diffstat:

1 file changed, 10 insertions(+)
src/login-common/master.c |   10 ++++++++++

diffs (20 lines):

diff -r 9ed4ecd4a866 -r 6f2bb9f58804 src/login-common/master.c
--- a/src/login-common/master.c	Sat Oct 18 20:26:35 2008 +0300
+++ b/src/login-common/master.c	Sat Oct 18 20:50:20 2008 +0300
@@ -69,6 +69,16 @@ void master_request_login(struct client 
 	unsigned int cmd_tag_size;
 
 	i_assert(auth_pid != 0);
+
+	if (master_fd == -1) {
+		struct master_login_reply reply;
+
+		i_assert(closing_down);
+		memset(&reply, 0, sizeof(reply));
+		reply.status = MASTER_LOGIN_STATUS_INTERNAL_ERROR;
+		callback(client, &reply);
+		return;
+	}
 
 	data = i_stream_get_data(client->input, &size);
 	cmd_tag_size = client->auth_command_tag == NULL ? 0 :


More information about the dovecot-cvs mailing list