dovecot-2.0: config: Don't fail if process_min_avail is set and ...

dovecot at dovecot.org dovecot at dovecot.org
Wed Dec 16 03:10:45 EET 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/72a0ec4b7e26
changeset: 10495:72a0ec4b7e26
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Dec 15 20:10:40 2009 -0500
description:
config: Don't fail if process_min_avail is set and process_limit is the default.

diffstat:

1 file changed, 5 insertions(+), 2 deletions(-)
src/master/master-settings.c |    7 +++++--

diffs (24 lines):

diff -r caee83356d7b -r 72a0ec4b7e26 src/master/master-settings.c
--- a/src/master/master-settings.c	Tue Dec 15 17:32:32 2009 -0500
+++ b/src/master/master-settings.c	Tue Dec 15 20:10:40 2009 -0500
@@ -305,7 +305,7 @@ master_settings_verify(void *_set, pool_
 	struct service_settings *const *services;
 	const char *const *strings;
 	ARRAY_TYPE(const_string) all_listeners;
-	unsigned int i, j, count;
+	unsigned int i, j, count, process_limit;
 
 	if (set->last_valid_uid != 0 &&
 	    set->first_valid_uid > set->last_valid_uid) {
@@ -368,7 +368,10 @@ master_settings_verify(void *_set, pool_
 				"used with chroot", service->name);
 			return FALSE;
 		}
-		if (service->process_min_avail > service->process_limit) {
+		process_limit = service->process_limit;
+		if (process_limit == 0)
+			process_limit = set->default_process_limit;
+		if (service->process_min_avail > process_limit) {
 			*error_r = t_strdup_printf("service(%s): "
 				"process_min_avail is higher than process_limit",
 				service->name);


More information about the dovecot-cvs mailing list