dovecot: Fixed dump-capability crash at startup

dovecot at dovecot.org dovecot at dovecot.org
Tue Jul 3 01:59:10 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/4cf56bf92215
changeset: 5871:4cf56bf92215
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 03 01:59:06 2007 +0300
description:
Fixed dump-capability crash at startup

diffstat:

1 file changed, 9 insertions(+), 7 deletions(-)
src/master/mail-process.c |   16 +++++++++-------

diffs (36 lines):

diff -r c9b49ed99d28 -r 4cf56bf92215 src/master/mail-process.c
--- a/src/master/mail-process.c	Tue Jul 03 01:50:13 2007 +0300
+++ b/src/master/mail-process.c	Tue Jul 03 01:59:06 2007 +0300
@@ -529,8 +529,8 @@ create_mail_process(enum process_type pr
 	}
 
 	/* check process limit for this user */
-	process_group = mail_process_group_lookup(process_type, user,
-						  remote_ip);
+	process_group = dump_capability ? NULL :
+		mail_process_group_lookup(process_type, user, remote_ip);
 	process_count = process_group == NULL ? 0 :
 		array_count(&process_group->processes);
 	if (process_count >= set->mail_max_userip_connections &&
@@ -643,14 +643,16 @@ create_mail_process(enum process_type pr
 		/* master */
 		var_expand(str, set->mail_log_prefix, var_expand_table);
 
-		if (!dump_capability)
+		if (!dump_capability) {
 			log_set_prefix(log, str_c(str));
-		if (process_group == NULL) {
-			process_group = mail_process_group_create(process_type,
+			if (process_group == NULL) {
+				process_group =
+					mail_process_group_create(process_type,
 								  user,
 								  remote_ip);
-		}
-		mail_process_group_add(process_group, pid);
+			}
+			mail_process_group_add(process_group, pid);
+		}
 		(void)close(log_fd);
 		return MASTER_LOGIN_STATUS_OK;
 	}


More information about the dovecot-cvs mailing list